From 5e5d41cffd035d73ef818d7ea1f4b191f3f008a6 Mon Sep 17 00:00:00 2001 From: joe Date: Sun, 21 Sep 2025 01:21:14 +0200 Subject: send colors --- src/esp/halfcab/halfcab.ino | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/esp') diff --git a/src/esp/halfcab/halfcab.ino b/src/esp/halfcab/halfcab.ino index c8935f5..57723d6 100644 --- a/src/esp/halfcab/halfcab.ino +++ b/src/esp/halfcab/halfcab.ino @@ -88,7 +88,25 @@ blink(void) void plain(void) { - fill(GRUV); + CRGB color; + byte r; + byte g; + byte b; + + color = BLACK; + while (Serial.available() <= 0) { + /* empty */ + } + color.r = Serial.read(); + while (Serial.available() <= 0) { + /* empty */ + } + color.g = Serial.read(); + while (Serial.available() <= 0) { + /* empty */ + } + color.b = Serial.read(); + fill(color); } void @@ -119,7 +137,7 @@ loop(void) } else { i = 0; while (i < NUM_LEDS) { - leds[i] = GREEN; + leds[i] = RED; i++; } FastLED.show(); -- cgit v1.2.3