First Git Push

This commit is contained in:
2026-10-23 21:46:37 +02:00
commit c7b8c89c2d
12 changed files with 800 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
#include <Wire.h>
#include "BotNetwork.h"
#include "MotionController.h"
#include "DisplayManager.h"
// Initialize Objects
BotNetwork botNetwork("PfLANze", "isteinbisschenengandiehals", "JackBot-AP", "robot-control");
MotionController motion;
DisplayManager display(5, 16, 17); // TFT_CS, TFT_DC, TFT_RST
void setup() {
Serial.begin(115200);
Wire.begin();
Wire.setClock(400000);
display.begin();
display.drawCenteredText("Connecting...", ST77XX_YELLOW);
if (botNetwork.begin(3323)) {
display.drawCenteredText("WiFi: Connected", ST77XX_CYAN);
} else {
display.drawCenteredText("AP: JackBot", ST77XX_MAGENTA);
}
motion.begin();
}
void loop() {
uint8_t buffer[512];
int size = botNetwork.readPacket(buffer, 512);
if (size > 0) {
botNetwork.parsePacket(buffer, size, &motion, &display);
}
motion.update();
display.update();
}