From 6c6b22a4f1320359c940574b5271d890171dfe05 Mon Sep 17 00:00:00 2001 From: joe Date: Sun, 21 Sep 2025 19:36:20 +0200 Subject: led strip not working what am i even dong --- src/esp/halfcab/halfcab.ino | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) (limited to 'src/esp') diff --git a/src/esp/halfcab/halfcab.ino b/src/esp/halfcab/halfcab.ino index 57723d6..58621db 100644 --- a/src/esp/halfcab/halfcab.ino +++ b/src/esp/halfcab/halfcab.ino @@ -89,9 +89,6 @@ void plain(void) { CRGB color; - byte r; - byte g; - byte b; color = BLACK; while (Serial.available() <= 0) { @@ -109,6 +106,30 @@ plain(void) fill(color); } +// void +// dynamic(void) +// { +// uint8_t i; +// +// i = 0; +// while (i < NUM_LEDS) { +// while (Serial.available() <= 0) { +// /* empty */ +// } +// leds[i].r = Serial.read(); +// while (Serial.available() <= 0) { +// /* empty */ +// } +// leds[i].g = Serial.read(); +// while (Serial.available() <= 0) { +// /* empty */ +// } +// leds[i].b = Serial.read(); +// i++; +// } +// FastLED.show(); +// } + void setup(void) { @@ -123,7 +144,6 @@ setup(void) void loop(void) { - uint8_t i; uint8_t com; com = 0; @@ -135,12 +155,14 @@ loop(void) plain(); return; } else { - i = 0; - while (i < NUM_LEDS) { - leds[i] = RED; - i++; - } - FastLED.show(); + fill(BLUE); } + + + + // else if (com == 0xfe) { + // dynamic(); + // } + delay(10); } -- cgit v1.2.3