Blynk not working on WiPy 3.0?
-
Hello everyone! I am working on a small robot built up from an old Mint+ floor cleaner, and because I can't seem to figure out how to use websockets, I decided to use Blynk for now to test things out. Unfortunately the Blynk library appears broken, unless I'm doing something wrong. My test code is basic:
import BlynkLib import time BLYNK_AUTH = 'MyAuthHere' blynk = BlynkLib.Blynk(BLYNK_AUTH) # to register virtual pins first define a handler def v3_write_handler(value): print('Current slider value: {}'.format(value)) # attach virtual pin 3 to our handler blynk.add_virtual_pin(3, write=v3_write_handler) # start Blynk (this call should never return) blynk.run()
I get the error:
AttributeError: 'module' object has no attribute 'Blynk'.
I'm not sure where to go from here. I haven't found anything useful on the forums or Google yet. I could've built a physical wifi controller with joysticks and buttons, using mqtt for communication, but I'm determined to figure this out. If nothing else, does anyone know of any good information on how to use websockets with the WiPy3?
-
@hypercoffeedude
I do not use blynk
but few things- are you sure that you have not more
BlynkLib
on your flash? - What is exact error message - all python messages point to line number with error. On your post you show only
AttributeError: 'module' object has no attribute 'Blynk'.
- this lib is for Wipy1 (maybe there are some differences) - but error message is not releated to this
- are you sure that you have not more
-
@livius This is the one I am using:
https://github.com/wipy/wipy/blob/master/lib/blynk/BlynkLib.pyI am on WiPy firmware version '1.17.0.b1'.
-
@hypercoffeedude said in Blynk not working on WiPy 3.0?:
BlynkLib
which BlynkLib are you trying to use?