From 97261dd6e66597f0ef1161f685815188e637c9af Mon Sep 17 00:00:00 2001 From: JbLb Date: Thu, 17 Dec 2020 12:20:44 +0100 Subject: [PATCH] led control and signaling -wip- --- src/hoverserial.ino | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/hoverserial.ino b/src/hoverserial.ino index 13b394e..80798af 100644 --- a/src/hoverserial.ino +++ b/src/hoverserial.ino @@ -108,8 +108,7 @@ bool rel_marche = true; #define LED_PIN 7 #define NUM_LEDS 2 -#define BRIGHTNESS 64 -#define LED_TYPE WS2812 +#define LED_TYPE WS2812B #define COLOR_ORDER GRB CRGB leds[NUM_LEDS]; @@ -132,7 +131,11 @@ void setup() if (consigne_speed > MAX_SPEED) { consigne_speed = MAX_SPEED ; } - + LEDS.addLeds(leds,NUM_LEDS); + LEDS.setBrightness(64); + leds[0] = CRGB(255,0,0); + LEDS.show(); + Serial.begin(SERIAL_BAUD); if (Serial) { Serial.println(VERSION_TAG); @@ -365,6 +368,8 @@ void loop(void) speed_control(); } +LEDS.show(); // update LEDS + // Nunchuk_control(); // Blink the LED digitalWrite(LED_BUILTIN, (timeNow % 2000) < 1000);