I’m having a little problems in the blocks from an app for home automation, in special with the button toggle.
I wanna control via an android app an arduino microcontroller, I’m looking for turn on/off lights (with 4-way relay module), gather information from a temperature/humidity sensor (dht22), sense presence with a PIR sensor. all via bluetooth.
I want to send a letter when the button is on, and another when the button turns off. this is for the connection via bluetooth and interface with arduino. this is the code block i think will works, but when compile an error appears.
I really appreciate any help.