Here is the code I am using:
import BlynkLib
BLYNK_AUTH = 'my authorization code'
# Initialize Blynk
blynk = BlynkLib.Blynk(BLYNK_AUTH)
# Register virtual pin handler New Version
@blynk.on("v3")
def v3_write_handler(value):
print('Current slider value: {}'.format(value
while True:
blynk.run()
The above example code from your latest website generates the following error:
/ _ )/ /_ _____ / /__
/ _ / / // / _ \/ '_/
/____/_/\_, /_//_/_/\_\
/___/ for Python v0.2.6
Traceback (most recent call last):
File “02_on_virtual_change_Barry.py”, line 32, in
@blynk.on(“v3”)
AttributeError: ‘Blynk’ object has no attribute ‘on’
I am using a Raspberry Pi Zero. What am I doing wrong?
Thank you,