Dezibot 4
Ampel3.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 }
8 
9 void loop() {
10  // put your main code here, to run repeatedly:
11 
12  if(dezibot.motion.detection.isShaken()){
13  dezibot.multiColorLight.setLed(TOP, YELLOW);
14  delay(2000);
15  dezibot.multiColorLight.setLed(TOP, GREEN);
16  delay(2000);
17  dezibot.multiColorLight.turnOffLed();
18  delay(1000);
19 
20  for(int i=0; i<3; i++){
21  dezibot.multiColorLight.setLed(TOP, GREEN);
22  delay(500);
23  dezibot.multiColorLight.turnOffLed();
24  delay(500);
25  }
26 
27  dezibot.multiColorLight.setLed(TOP, YELLOW);
28  delay(2000);
29  }
30  else{
31  dezibot.multiColorLight.setLed(TOP, RED);
32  }
33 
34 }