Dezibot 4
Loading...
Searching...
No Matches
shake_detection.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
7dezibot.begin();
8dezibot.multiColorLight.turnOffLed();
9
10}
11
12void loop() {
13 // put your main code here, to run repeatedly:
14if(dezibot.motion.detection.isShaken(1000,zAxis)){
15 dezibot.multiColorLight.setTopLeds(0xFF0000);
16} else if(dezibot.motion.detection.isShaken(1000,xAxis|yAxis)) {
17 dezibot.multiColorLight.setTopLeds(0x00FF00);
18}
19}