What is Virtual Pins
Exchange any data between Blynk app and your hardware
Last updated
Exchange any data between Blynk app and your hardware
Last updated
This documentation is for the LEGACY version of Blynk platform which is no longer supported and will be shut down.
You can sign up for the current version of Blynk platform here.
The new mobile apps can be downloaded from App Store and Google Play.
The actual Blynk documentation is here.
Virtual Pin is a concept invented by Blynk Inc. to provide exchange of any data between hardware and Blynk mobile app.
Virtual pins are different than Digital and Analog Input/Output (I/O) pins. They are physical pins on your microcontroller board where you connect sensors and actuators.
Blynk lets you control any hardware connected to Digital and Analog pins without having to write any additional code.
For example, if you need to turn On/Off LED connected to Digital pin, you don't have to write any code:
Just use BlynkBlink code for your hardware.
In the Blynk app - add Button Widget and set it to pin D8
That's it! No additional code is required. Simply press Play in the app.
That was, easy, right? But what if you need more flexibility?
Virtual pins allow you to interface with any sensor, any library, any actuator.
Think about Virtual Pins as a box where you can put any value, and everyone who has access to this box can see this value.
It's a very powerful feature to display and send any data from your hardware to Blynk app.
āļø Remember, that virtual pins have no physical properties.
There are two fundamental commands you need to know to use Virtual Pins:
Use this block of code:
Where param.asInt()
is the value from V5.
š Full article: How to control anything with Blynk
Use this command Blynk.virtualWrite(V5)
where V5 is the Virtual Pin you are using.
ā ļø WARNING:
Don't place Blynk.virtualWrite(V5)
inside void loop()
ā Why? ā Read here
--- If you have questions or something is not working, visit our š„ community page.
Also, full š documentation is here.
Imagine that there are "virtual" pins that you can use
š Full article: How to display any sensor data with Blynk