Virtual Pins in if

How to create ifs using virtual pins

if(V20 == HIGH){
code here

I want to create an automation that does not use the eventor, because to and start my program every time I want to turn off this automation sucks.

Where is the command to turn V20 HIGH coming from? A Widget I would assume.

BLYNK_WRITE(V20)  //attach widget to virtual pin 20 and send HIGH when triggered
 if(param.asInt() == 1){
       code here

BLYNK_READ or BLYNK_WRITE, I’m do not understand english nad using chrome translate, but the translation is crap and I’m more lost than a caveman nowadays.


Even if English was your native language then you would probably struggle and I’m guessing you understand the difference between reading and writing.

However the functions weren’t written for Blynkers hardware they were written for the Blynk server. Therefore your hardware needs a BLYNK_WRITE() to read information coming from the server.

Not logical for Blynkers but easy enough if you remember the terms are for the server not your hardware.

I believe there is an option to have more logical names but I have eventually got used to the names.