Skip to content

Instantly share code, notes, and snippets.

@bshambaugh
Created November 7, 2021 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bshambaugh/de846af8637f590b5a47225b526f23f2 to your computer and use it in GitHub Desktop.
Save bshambaugh/de846af8637f590b5a47225b526f23f2 to your computer and use it in GitHub Desktop.
Blink LED with the CubeCell NeoPixels Library
#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