Hello!
Could someone help?
I’m dificauldades to control lamps, using shield W5100, relay module and physical switch with Blink.
The difficulty in question is: Tap the widget button (Blynk) and the light comes on, go on the physical switch and turn off the lamp, the widget button to change the status on to off.
Here in the community, I found some discussions and codes, however, could not implement.
components
Arduino Mega
Relay Module 4-channel
three way switch
The sample code, the physical switch on and off the LED widget (App Blynk).
What I like: Both the physical switch and the button widget (App Blynk), on and off the lamp using a relay. If you turn off the lamp with the physical switch, should aprentar the widget button status off.
Yes. Those example above shows you how you can do it. You just need replace led.on() with Blynk.virtualWrite(). And pass virtual pin of your button.
To be more specific. Let’s assume you have a button on Virtual pin 1.
Ti turn it on you need to