"""
[WRITE VIRTUAL PIN EXAMPLE] ========================================================================
Environment prepare:
In your Blynk App project:
- add "Slider" widget,
- bind it to Virtual Pin V4,
- set values range 0-255
- add "LED" widget and assign Virtual Pin V4 to it
- Run the App (green triangle in the upper right corner).
- define your auth token for current example and run it
This started program will periodically call and execute event handler "write_virtual_pin_handler".
In app you can move slider that will cause LED brightness change and will send virtual write event
to current running example. Handler will print pin number and it's updated value.
Schema:
====================================================================================================
+-----------+ +--------------+ +--------------+
| | | | | |
| blynk lib | | blynk server | | blynk app |
| | | virtual pin | | |
| | | | | |
+-----+-----+ +------+-------+ +-------+------+
| | |
| | write event from "Slider" widget |
| | |
| +