Virtual Pins not working at all?

I have been using Blynk for my IoT central system to create lights and temperature for a while now. Today, I am working on a way for my lighting to randomly turn on and off as a theft deterrent while I’m away. In order to do that, I am rewriting my Arduino code to use virtual pins instead of direct control via the Blynk app, so that I can locally change values and they are reflected inside the app.

However, virtual pins seem to not be working at all. I have uploaded this example sketch.

When I press my V1 button in the app, the Arduino’s Ethernet Shield reacts by indicating network activity, but the serial console stays empty. I receive the

[0] Blynk v0.2.1 [0] Getting IP... [1489] My IP: [1490] Connecting to [14497] Ready!

output upon starting the Arduino, but it never receives any virtual pin values.

What am I doing wrong?

Thanks a lot.

genuine Arduino UNO. Using

[0] Blynk v0.2.1

Please try with latest blynk library.

Hey there,

thanks for the tip. I’ve moved the sketch to my local arduino IDE from codebender and installed the newest Blynk library. I’ve also removed the V from the pins (BLYNK_WRITE(1) instead of BLYNK_WRITE(V1) and now it works perfectly.

Why isn’t the newest Blynk library on codebender though? I thought it was supposed to always just be up to date.



@vshymanskyy could you please answer?

yes we will update the library on codebender soon - we’re currently making some major changes in the library.
Anyway - there shouldn’t be any issues with virtual pins - that part didn’t change since Blynk started :wink:

Thanks a lot for the assistance. Apparently the problem with the sketch is just that it says V in front of the virtual pins then. Or something else that I changed and didn’t remember. Glad that the library’s going to be updated, I love codebender so much :slight_smile:

If I may sneak in a short request - the Blynk app on Android currently won’t rotate into reverse portrait mode on tablets. I’m using a Nexus 7 as my IoT central, and I want to mount it upside down to lay the charging cable more neatly. Most apps rotate upside down on a tablet, Blynk won’t sadly.

Otherwise I fucking love Blynk, it’s such an awesome idea and so well executed. Keep it up guys.