added example sketches
This commit is contained in:
1 parent
dbec7278f3
commit
a0e6661b16
18 files changed
+186
-65
No files matched your search
@@ -0,0 +1,34 @@
|
||||
#include "Dezibot.h"
|
||||
|
||||
Dezibot dezibot = Dezibot();
|
||||
void setup() {
|
||||
// put your setup code here, to run once:
|
||||
dezibot.begin();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
|
||||
if(dezibot.motion.detection.isShaken()){
|
||||
dezibot.multiColorLight.setLed(TOP, YELLOW);
|
||||
delay(2000);
|
||||
dezibot.multiColorLight.setLed(TOP, GREEN);
|
||||
delay(2000);
|
||||
dezibot.multiColorLight.turnOffLed();
|
||||
delay(1000);
|
||||
|
||||
for(int i=0; i<3; i++){
|
||||
dezibot.multiColorLight.setLed(TOP, GREEN);
|
||||
delay(500);
|
||||
dezibot.multiColorLight.turnOffLed();
|
||||
delay(500);
|
||||
}
|
||||
|
||||
dezibot.multiColorLight.setLed(TOP, YELLOW);
|
||||
delay(2000);
|
||||
}
|
||||
else{
|
||||
dezibot.multiColorLight.setLed(TOP, RED);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user