mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-05-19 02:51:47 +02:00
24 lines
474 B
C++
24 lines
474 B
C++
#include "Dezibot.h"
|
|
|
|
Dezibot dezibot = Dezibot();
|
|
void setup() {
|
|
// put your setup code here, to run once:
|
|
dezibot.begin();
|
|
dezibot.multiColorLight.turnOffLed();
|
|
}
|
|
|
|
void loop() {
|
|
// put your main code here, to run repeatedly:
|
|
dezibot.display.clear();
|
|
int light = dezibot.lightDetection.getValue(DL_FRONT);
|
|
dezibot.display.print(light);
|
|
|
|
if(light > 2000) {
|
|
dezibot.motion.move();
|
|
} else {
|
|
dezibot.motion.rotateClockwise();
|
|
}
|
|
delay(100);
|
|
|
|
}
|