From 19ca7692949dad8267f0820a4fefb9a1125b37ec Mon Sep 17 00:00:00 2001 From: Clement Date: Fri, 20 Oct 2023 20:42:46 +0200 Subject: [PATCH] add led test --- include/Program.h | 3 +++ src/Program.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/include/Program.h b/include/Program.h index 205afc3..3da93f5 100644 --- a/include/Program.h +++ b/include/Program.h @@ -6,6 +6,7 @@ #include "DiscordAPI.h" #include "SwitchableEncodeur.h" +#include "LedLib.h" @@ -32,6 +33,8 @@ private: long oldPosition; DiscordAPI* discord; + + LedLib* ledLib; }; #endif diff --git a/src/Program.cpp b/src/Program.cpp index 9e58303..9f4d975 100644 --- a/src/Program.cpp +++ b/src/Program.cpp @@ -31,11 +31,15 @@ Program::Program() { // Startup Encoder this->encoder = new SwitchableEncodeur(ENCODER_DT, ENCODER_CLK, ENCODER_SWITCH, 3); + + // Startup LEDs + this->ledLib = new LedLib(PIXEL_COUNT, PIXEL_PIN, 255); } void Program::loop() { if(this->encoder->update()){ Serial.print(this->encoder->getValue()); + this->ledLib->actLed(this->encoder->getValue()); Serial.print(" "); Serial.println(this->encoder->getMenu()); }