From 059e4d41b994f67fad925843895a7f07b494b282 Mon Sep 17 00:00:00 2001 From: JbLb Date: Thu, 17 Dec 2020 11:29:17 +0100 Subject: [PATCH] ajust BTN & Led pins --- src/hoverserial.ino | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/hoverserial.ino b/src/hoverserial.ino index 76c495c..13b394e 100644 --- a/src/hoverserial.ino +++ b/src/hoverserial.ino @@ -31,9 +31,9 @@ // ******************************************************************* #define VERSION_TAG "V test 0.1" -#define BTN_PLUS 2 -#define BTN_MOINS 3 -#define BTN_MARCHE 4 +#define BTN_PLUS 4 +#define BTN_MOINS 5 +#define BTN_MARCHE 6 #define MAX_SPEED 300 @@ -106,8 +106,8 @@ bool rel_marche = true; // ################ Led definition ######################## -#define LED_PIN 5 -#define NUM_LEDS 1 +#define LED_PIN 7 +#define NUM_LEDS 2 #define BRIGHTNESS 64 #define LED_TYPE WS2812 #define COLOR_ORDER GRB @@ -126,6 +126,9 @@ void setup() pinMode(LED_BUILTIN, OUTPUT); consigne_speed = EEPROMReadInt(eeprom_address); + if (consigne_speed < 0) { + consigne_speed =0; + } if (consigne_speed > MAX_SPEED) { consigne_speed = MAX_SPEED ; }