mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-05-21 20:11:46 +02:00
add example sketch
This commit is contained in:
parent
fb3b4211d5
commit
b8474815c0
18
example/motion.ino
Normal file
18
example/motion.ino
Normal 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);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user