Dezibot 4
Loading...
Searching...
No Matches
phototaxis.ino
Go to the documentation of this file.
1#include "Dezibot.h"
2
3Dezibot dezibot = Dezibot();
4void setup() {
5 // put your setup code here, to run once:
6 dezibot.begin();
7 dezibot.multiColorLight.turnOffLed();
8 }
9
10void loop() {
11 // put your main code here, to run repeatedly:
12 dezibot.display.clear();
13 int light = dezibot.lightDetection.getValue(DL_FRONT);
14 dezibot.display.print(light);
15
16 if(light > 2000) {
17 dezibot.motion.move();
18 } else {
19 dezibot.motion.rotateClockwise();
20 }
21 delay(100);
22
23}