aboutsummaryrefslogtreecommitdiffstats
path: root/src/esp
diff options
context:
space:
mode:
authorjoe <rbo@gmx.us>2025-09-20 18:24:36 +0200
committerjoe <rbo@gmx.us>2025-09-20 18:24:36 +0200
commit978bf4e4d1feb0d28ccc3eab0e8b6c781dab32ca (patch)
tree23d3a9294e61df30dfdcc5d03ae027cd8dc62133 /src/esp
parentok (diff)
downloadhalfcab-978bf4e4d1feb0d28ccc3eab0e8b6c781dab32ca.tar.gz
halfcab-978bf4e4d1feb0d28ccc3eab0e8b6c781dab32ca.tar.bz2
halfcab-978bf4e4d1feb0d28ccc3eab0e8b6c781dab32ca.tar.xz
halfcab-978bf4e4d1feb0d28ccc3eab0e8b6c781dab32ca.tar.zst
halfcab-978bf4e4d1feb0d28ccc3eab0e8b6c781dab32ca.zip
com works
Diffstat (limited to 'src/esp')
-rw-r--r--src/esp/halfcab/halfcab.ino35
1 files changed, 12 insertions, 23 deletions
diff --git a/src/esp/halfcab/halfcab.ino b/src/esp/halfcab/halfcab.ino
index 9dac98c..c8935f5 100644
--- a/src/esp/halfcab/halfcab.ino
+++ b/src/esp/halfcab/halfcab.ino
@@ -51,23 +51,7 @@
#include <FastLED.h>
-#define DATA_PIN D2
-#define NUM_LEDS 60
-#define BRIGHTNESS 254
-#define LED_TYPE WS2812B
-#define COLOR_ORDER GRB
-
-enum colors_e {
- R,
- G,
- B
-};
-
-#define BLACK CRGB(0, 0, 0)
-#define RED CRGB(255, 0, 0)
-#define GREEN CRGB(0, 255, 0)
-#define BLUE CRGB(0, 0, 255)
-#define GRUV CRGB(255, 80, 0)
+#include "c_defines.h"
CRGB leds[NUM_LEDS];
@@ -87,12 +71,16 @@ fill(CRGB color)
void
blink(void)
{
- fill(BLUE);
- delay(100);
+ fill(RED);
+ delay(60);
+ fill(BLACK);
+ delay(60);
+ fill(RED);
+ delay(60);
fill(BLACK);
- delay(100);
- fill(BLUE);
- delay(100);
+ delay(60);
+ fill(RED);
+ delay(60);
fill(BLACK);
delay(1000);
}
@@ -100,6 +88,7 @@ blink(void)
void
plain(void)
{
+ fill(GRUV);
}
void
@@ -110,6 +99,7 @@ setup(void)
FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS);
FastLED.setBrightness(BRIGHTNESS);
fill(BLACK);
+ blink();
}
void
@@ -118,7 +108,6 @@ loop(void)
uint8_t i;
uint8_t com;
- blink();
com = 0;
while (Serial.available() <= 0) {
/* empty */