Emulate an Arduino remote control & send WiFi signals to an IR transceiver

You’re approaching this from the wrong angle.
The way to do it is to use Button widgets, set to Push mode and each connected to a different virtual pin.
The button will send a “1” when pressed and a “0” when released by default, and there’s no need to change this default behaviour.

The code running on the MCU will include a BLYNK_WRITE(Vpin) callback for each button widget. You will only want to take action when the button is pressed (not released) so you’ll start by only proceeding if the received value is a “1”.
At that point you can take whatever action you want, such as calling a function with a parameter which sends the specified IR code.

There are quite a few projects around where this has already been done. Here is one:

I’ve not studied the code in this example, and as it was written by a newcomer it may well have some serious flaws, but doing more searches will probably deliver something you can work with.

Pete.

1 Like