I am using Micropython to control ESP8266 V2 with wifi communication to the internet.
My Blynk is at my iPad with iOS, version 12.2. In order to integrate Blynk to my projects, I uploaded the Micropython library making a sudo -H pip3 install Blynk-library-python. Then I created main.py with the example given in https://github.com/vshymanskyy/blynk-library-python/blob/master/examples/hardware/ESP8266_ESP32.py, replacing my SSID, password and token with my own.
My problem is the library is not recognized my the board. The error message I get is:
Traceback (most recent call last):
File “main.py”, line 16, in
ImportError: no module named ‘BlynkLib’
Is there something wrong in my procedure? Did I miss something? Please advise.
import BlynkLib import network import machine WIFI_SSID = 'YourWiFiNetwork' WIFI_PASS = 'YourWiFiPassword' BLYNK_AUTH = 'YourAuthToken' print("Connecting to WiFi...") wifi = network.WLAN(network.STA_IF) wifi.active(True) wifi.connect(WIFI_SSID, WIFI_PASS) while not wifi.isconnected(): pass print('IP:', wifi.ifconfig()) print("Connecting to Blynk...") blynk = BlynkLib.Blynk(BLYNK_AUTH) @blynk.ON("connected") def blynk_connected(ping): print('Blynk ready. Ping:', ping, 'ms') def runLoop(): while True: blynk.run() machine.idle() # Run blynk in the main thread: runLoop()