In yesterday’s program, the first commands were evaluated by the controller. Today’s program maintains this function but can also additionally send a command into the network independently.
The button on pin D8 You will find a button behind today’s door. It is used as a simple sensor here. Connect it to the controller as shown in the setup image.
The program: Day6_UDPSwitch
! Attention: Some MAC-Users reportet a bug in the PacketSender-Software. This bug doesn’t allow you to change the ports. If you have problems with this bug you can change the ports in the Arduino program. All you have to do for todays project is to change the line 83 from
succes &= sendCom(“AT+CIPSTART="UDP","192.168.4.255",90,91”, “OK”);
to
succes &= sendCom(“AT+CIPSTART="UDP","192.168.4.255",5505,5506”, “OK”);
...