diff options
Diffstat (limited to 'src/esp')
-rw-r--r-- | src/esp/halfcab/halfcab.ino | 35 |
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 */ |