add fernbedienung example

This commit is contained in:
Anton Jacker
2024-06-13 15:59:51 +02:00
parent 76dee5d2b4
commit 159b6b239b
2 changed files with 71 additions and 0 deletions

View File

@ -0,0 +1,25 @@
#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() {
}