Blynk app interaction with real button

Hi,

I looked over forum but did not find anythink similar . I´m thinking about connection between blynk app and real button/switch. Is there way to control digital pin of the arduino or ESP8266 by app and by real button? Like I have microswitch connected to some digital pin and that will light up lamp, and I want to control it by blynk app and also by real button.

Many thanks for suggestions.

1 Like

You definitely can do it.

The only issue you’ll have, is that Blynk doesn’t have a functionality to change Button state in the app. However you can use LED widget to reflect the actual status.

So it’s a workaround, but it works.

Ok, I think I understand but this will also work when app si not running? If I get you answer right, app will check status of the led, not the status of the pin. So I will press the button while the app is not running and after start of app, app will take status of the led from server and change it to current status. If I press button in app, that will change status of the pin which will be watched by sketch of the arduino and that would change status of the lamp. Probably realy begenner question, but where should be code for this in blynk sketch(void setup/void loop)?

Hi Pavel, Has the button state change functionality been implemented since this original post?

@nolmath yes it was done many days ago. Have look here.

1 Like

and i ve just used it yesterday over websockets, can confirm it works :slightly_smiling:

1 Like

5 posts were split to a new topic: Need help with flow sensor