Watchdog in the first Byte

This commit is contained in:
Stedd 2023-10-21 19:37:38 +02:00
parent 0991343a55
commit 7ab1ee525d
1 changed files with 5 additions and 2 deletions

View File

@ -7,6 +7,8 @@ const char* password = "&nHM%D2!$]Qg[VUv";
const IPAddress multicastIP = IPAddress(239, 1, 2, 3);
int port = 1234;
byte watchdog = 0;
AsyncUDP udp;
void UdpInit() {
@ -16,7 +18,8 @@ void UdpInit() {
}
void UdpLoop() {
byte data[8] = {1, 2, 3, 4, 5, 6, 7, 8};
byte data[8] = { 1, 2, 3, 4, 5, 6, 7, 8 };
data[0] = watchdog++;
udp.writeTo(data, sizeof(data), multicastIP, port);
}