Dezibot 4
phototaxis.ino
Go to the documentation of this file.
1 #include "Dezibot.h"
2 
3 Dezibot dezibot = Dezibot();
4 void setup() {
5  // put your setup code here, to run once:
6  dezibot.begin();
7  dezibot.multiColorLight.turnOffLed();
8  }
9 
10 void 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 }