Button Widget + simple timer

Did you use a BlynkTimer in Timeout mode, preferably as part of a Lambda function?

Read the “Timeout Timers” section of this document, and don’t forget to declare your BlynkTimer object and add timer.run(); to your void loop.

Once you have this working, if you want to add a slider or time input widget to your app to change the amount of time that the relay stays on for with each button press then you can use the technique described in the "Using variables instead of hard-coded numbers2 section of that document.

You may also need to learn about how to retrieve values from virtual pins, and how to sync the current values when the device starts up. That’s covered here…

Pete.

1 Like