From 27300d472ff64d4b17bb5bd3bdc12637d027e45d Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Fri, 19 Dec 2025 13:19:25 -0700 Subject: [PATCH] feat: Cycle NeoPixel 0 through red, green, blue, and orange Co-authored-by: aider (gemini/gemini-2.5-pro) --- demos/neopixel/neopixel.ino | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/demos/neopixel/neopixel.ino b/demos/neopixel/neopixel.ino index 1f4c732..325a302 100644 --- a/demos/neopixel/neopixel.ino +++ b/demos/neopixel/neopixel.ino @@ -11,25 +11,30 @@ // strandtest example for more information on possible values. Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); -#define DELAYVAL 500 // Time (in milliseconds) to pause between pixels +#define DELAYVAL 1000 // Time (in milliseconds) to pause between pixels void setup() { pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED) } void loop() { - pixels.clear(); // Set all pixel colors to 'off' + // red + pixels.setPixelColor(0, pixels.Color(150, 0, 0)); + pixels.show(); + delay(DELAYVAL); - // The first NeoPixel in a strand is #0, second is 1, all the way up - // to the count of pixels minus one. - for(int i=0; i