add led test
This commit is contained in:
parent
e30902a5cf
commit
19ca769294
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "DiscordAPI.h"
|
#include "DiscordAPI.h"
|
||||||
#include "SwitchableEncodeur.h"
|
#include "SwitchableEncodeur.h"
|
||||||
|
#include "LedLib.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -32,6 +33,8 @@ private:
|
|||||||
long oldPosition;
|
long oldPosition;
|
||||||
|
|
||||||
DiscordAPI* discord;
|
DiscordAPI* discord;
|
||||||
|
|
||||||
|
LedLib* ledLib;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -31,11 +31,15 @@ Program::Program() {
|
|||||||
|
|
||||||
// Startup Encoder
|
// Startup Encoder
|
||||||
this->encoder = new SwitchableEncodeur(ENCODER_DT, ENCODER_CLK, ENCODER_SWITCH, 3);
|
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() {
|
void Program::loop() {
|
||||||
if(this->encoder->update()){
|
if(this->encoder->update()){
|
||||||
Serial.print(this->encoder->getValue());
|
Serial.print(this->encoder->getValue());
|
||||||
|
this->ledLib->actLed(this->encoder->getValue());
|
||||||
Serial.print(" ");
|
Serial.print(" ");
|
||||||
Serial.println(this->encoder->getMenu());
|
Serial.println(this->encoder->getMenu());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user