add example sketch

This commit is contained in:
99cardz 2024-02-06 13:33:56 +01:00
parent fb3b4211d5
commit b8474815c0

18
example/motion.ino Normal file
View File

@ -0,0 +1,18 @@
#include <Dezibot.h>
Dezibot dezibot = Dezibot();
void setup() {
dezibot.begin();
Serial.begin(9600);
}
void loop() {
Serial.println("bla");
dezibot.motion.move(1000);
dezibot.multiColorLight.setLed(BOTTOM, RED);
delay(2000); dezibot.motion.rotateAnticlockwise(1000);
dezibot.multiColorLight.setLed(BOTTOM, GREEN);
delay(2000); dezibot.motion.rotateClockwise(1000);
dezibot.multiColorLight.setLed(BOTTOM, BLUE);
delay(2000);
dezibot.multiColorLight.turnOffLed();
delay(2000);
}