Created
November 7, 2021 16:37
-
-
Save bshambaugh/de846af8637f590b5a47225b526f23f2 to your computer and use it in GitHub Desktop.
Blink LED with the CubeCell NeoPixels Library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "CubeCell_NeoPixel.h" | |
CubeCell_NeoPixel pixels(1, RGB, NEO_GRB + NEO_KHZ800); | |
void setup() { | |
// put your setup code here, to run once: | |
pinMode(Vext,OUTPUT); | |
digitalWrite(Vext,LOW); //SET POWER | |
pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED) | |
pixels.clear(); // Set all pixel colors to 'off' | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
pixels.setPixelColor(0, pixels.Color(0, 0, 125)); | |
pixels.show(); // Send the updated pixel colors to the hardware. | |
delay(200); // Pause before next pass through loop | |
// pixels.clear(); /// if I included this, I would get an led that never turned off | |
// this code does the same thing as pixels.clear(); | |
pixels.setPixelColor(0, pixels.Color(0, 0, 0)); | |
pixels.show(); // Send the updated pixel colors to the hardware. | |
delay(200); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment