Hi everybody,
I’m trying to start with Blynk using Micropython. However the official library seems to be too outdated
For that reason I’m using the library BlynkLib.py provided here
I have written an small program that I run locally that reads from the analog input (A0)
from machine import Pin, ADC
from time import sleep
pot = ADC(0)
led = Pin(2, Pin.OUT)
while True:
pot_value = pot.read()
print(pot_value)
I’d like to use Blynk to see the value of the analog input (A0) on my Dashboard in Blynk, I only got this
import BlynkLib
blynk = BlynkLib.Blynk('BLYNK_AUTH_TOKEN')
while True:
blynk.run()
When I run the code, it connects to Blynk and I can see the status changes to ONLINE
But if I try to add more code like:
@blynk.handle_event('read V02')
def my_read_handler():
I got errors:
AttributeError: 'Blynk' object has no attribute 'handle_event'
Unfortunatelly I couldn’t find examples that helped me
I’d appreciate if you can share an example with me or any suggestion, thanks!