aboutsummaryrefslogtreecommitdiffstats
path: root/src/esp
diff options
context:
space:
mode:
authorjoe <rbo@gmx.us>2025-09-21 01:21:14 +0200
committerjoe <rbo@gmx.us>2025-09-21 01:21:14 +0200
commit5e5d41cffd035d73ef818d7ea1f4b191f3f008a6 (patch)
tree6a6e8dab8d66a3d8bdf30fbb571146d922cb3939 /src/esp
parentbetter license (diff)
downloadhalfcab-5e5d41cffd035d73ef818d7ea1f4b191f3f008a6.tar.gz
halfcab-5e5d41cffd035d73ef818d7ea1f4b191f3f008a6.tar.bz2
halfcab-5e5d41cffd035d73ef818d7ea1f4b191f3f008a6.tar.xz
halfcab-5e5d41cffd035d73ef818d7ea1f4b191f3f008a6.tar.zst
halfcab-5e5d41cffd035d73ef818d7ea1f4b191f3f008a6.zip
send colors
Diffstat (limited to 'src/esp')
-rw-r--r--src/esp/halfcab/halfcab.ino22
1 files changed, 20 insertions, 2 deletions
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();