From f16d0597ec463acfe660e3a38abf776991af8fd0 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Wed, 9 Oct 2024 02:03:07 -0400 Subject: [PATCH] Update esp32 neopixel demo script --- ino/demos/esp32_neopixel/esp32_neopixel.ino | 22 +++++---------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/ino/demos/esp32_neopixel/esp32_neopixel.ino b/ino/demos/esp32_neopixel/esp32_neopixel.ino index 294a484..5ca60d2 100644 --- a/ino/demos/esp32_neopixel/esp32_neopixel.ino +++ b/ino/demos/esp32_neopixel/esp32_neopixel.ino @@ -4,28 +4,16 @@ #define PIN 15 #define NUM 1 -int r = 255; -int g = 255; -int b = 255; - -//neopixel jewel 7 = NEO_GRBW + NEO_KHZ800 -//neopixel strips = NEO_GRB + NEO_KHZ800 -Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUM, PIN, NEO_GRBW + NEO_KHZ800); +Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUM, PIN, NEO_GRB + NEO_KHZ800); void setup() { Serial.begin(115200); pixels.begin(); - pixels.setBrightness(55); - for ( int i = 0; i < NUM; i++ ) { - pixels.setPixelColor(i, 0, 0, 0); - } + pixels.setBrightness(255); + pixels.fill(0xFF0000); pixels.show(); } void loop () { - for ( int i = 0; i < NUM; i++ ) { - pixels.setPixelColor(i, r, g, b); - } - pixels.show(); - delay(300); -} \ No newline at end of file + pixels.show(); +}