From 0a6aafd362a4afb814ea6abca11891d59a8cf4ae Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 27 Oct 2023 20:52:04 +0200 Subject: [PATCH 1/2] Fix led OK --- lib/LedLib/scr/LedLib.cpp | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/lib/LedLib/scr/LedLib.cpp b/lib/LedLib/scr/LedLib.cpp index 2a9c9ed..4f17975 100644 --- a/lib/LedLib/scr/LedLib.cpp +++ b/lib/LedLib/scr/LedLib.cpp @@ -54,28 +54,15 @@ int LedLib::getledNB(){ } void LedLib::okBlink(){ - int tempR; - int tempV; - int tempB; - - for (int i = 0; i < 3*2; i++) { - if(i%2 == 0){ - tempR = 0; - tempV = 0; - tempB = 0; - - }else{ - tempR = 75; - tempV = 181; - tempB = 67; - } - - for (int j = 0; j < 24; j++) { - // On fait clignoter les LEDs pour confirmer - // We make the LEDs blink to confirm - this->strip->setPixelColor(j-1, tempR, tempV, tempB); - } - - this->strip->show(); - } + this->strip->clear(); + for(int i = 0; i < 3; i++){ + for(int j = 0; j < 24; j++){ + this->strip->setPixelColor(j, 0, 255, 0); + } + this->strip->show(); + delay(100); + this->strip->clear(); + this->strip->show(); + delay(100); + } } -- 2.47.1 From 21d139465d0df1b43c972ed1758109c7e5a8f111 Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 27 Oct 2023 20:53:28 +0200 Subject: [PATCH 2/2] add blink at end setup --- src/Program.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Program.cpp b/src/Program.cpp index ea8cd16..102fdb1 100644 --- a/src/Program.cpp +++ b/src/Program.cpp @@ -39,6 +39,8 @@ Program::Program() { // Startup LEDs this->ledLib = new LedLib(PIXEL_COUNT, PIXEL_PIN, 255); + this->ledLib->okBlink(); + } void Program::sendTime(String timeEnd){ -- 2.47.1