2024-06-11 20:14:56 +02:00

38 lines
792 B
C++

#include "Dezibot.h"
Dezibot dezibot = Dezibot();
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
dezibot.begin();
}
void loop() {
switch (dezibot.motionDetection.getTiltDirection()) {
case Front:
dezibot.multiColorLight.setTopLeds(GREEN);
break;
case Left:
dezibot.multiColorLight.setTopLeds(YELLOW);
break;
case Right:
dezibot.multiColorLight.setTopLeds(TURQUOISE);
break;
case Back:
dezibot.multiColorLight.setTopLeds(BLUE);
break;
case Flipped:
dezibot.multiColorLight.setTopLeds(PINK);
break;
case Neutral:
dezibot.multiColorLight.turnOffLed();
break;
case Error:
dezibot.multiColorLight.setTopLeds(RED);
break;
}
delay(100);
}