mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-05-19 02:51:47 +02:00
26 lines
529 B
C++
26 lines
529 B
C++
#include "Dezibot.h"
|
|
|
|
|
|
Dezibot dezibot = Dezibot();
|
|
|
|
void receivedCallback(String &msg) {
|
|
if (msg == "vorn") {
|
|
dezibot.motion.move();
|
|
} else if (msg == "links") {
|
|
dezibot.motion.rotateAntiClockwise();
|
|
} else if (msg == "rechts") {
|
|
dezibot.motion.rotateClockwise();
|
|
} else if (msg == "stop") {
|
|
dezibot.motion.stop();
|
|
}
|
|
}
|
|
void setup() {
|
|
dezibot.begin();
|
|
dezibot.communication.begin();
|
|
dezibot.communication.setGroupNumber(5);
|
|
dezibot.communication.onReceive(&receivedCallback);
|
|
}
|
|
|
|
void loop() {
|
|
}
|