From 7ab1ee525dd38d3a04b049300a672b6d11f97378 Mon Sep 17 00:00:00 2001 From: Stedd Date: Sat, 21 Oct 2023 19:37:38 +0200 Subject: [PATCH] Watchdog in the first Byte --- UDP.ino | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/UDP.ino b/UDP.ino index 01960c3..3c984bb 100644 --- a/UDP.ino +++ b/UDP.ino @@ -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,8 +18,9 @@ void UdpInit() { } void UdpLoop() { - byte data[8] = {1, 2, 3, 4, 5, 6, 7, 8}; - udp.writeTo(data, sizeof(data), multicastIP, port); + byte data[8] = { 1, 2, 3, 4, 5, 6, 7, 8 }; + data[0] = watchdog++; + udp.writeTo(data, sizeof(data), multicastIP, port); }