User manual
The process in the Packet Sender
The changes to the program are mostly in the loop-routine. A simple if-query
checks if the switch is pushed. If this is the case, the controller will submit the
message Button=1 to the network. Additionally, there will be a debug-message.
The following while-loop prevents an entire flood of commands from being sent at
once while you push the switch. You need to release the button before the pro-
gram continues.
001
if (!digitalRead(SWITCH))
002
{
003
debug("Button=1");
004
sendUDP("Button=1");
005
while (!digitalRead(SWITCH)) {}
006
}