Dear Sirs,
I need something to implement and I am not sure if it possible and how can do it.
In a project that I have, I use a virtual switch in SWITCH mode. This switch is acting as “appliance on/off switch”. From my WeMos MCU I need in some cases to take control this switch and to put it on or off (without the user doing anything on Blynk application).
Is it possible to implement this? If yes, when I put the virtual switch from WeMos at off, the related routine BLYNK_WRITE(Vxx)
{ if (param.asInt()) …
will be executed?
@Costas
yes that is more clear to me now.(the commands to turn on or off the switch)
The only problem that I faced on is whereto put Blynk.syncVirtual(Vx) command?
I tried to put in my function and I got error that is undeclared to this scope or something equivalent…
@Costas
I didn’t tried to put Blynk.syncVirtual(Vx) command inside BLYNK_WRITE(Vx) function but inside my function and got the reported error.
Sp the only possible/permmited places to put the Blynk.syncVirtual(Vx) command is inside setup region or inside BLYNK_CONNECTED() etc. Am I right?