I am working my way through the Core electronics tutoria
l “How to Build Internet-Connected Electronics Projects”
All had gone well till when I get to “06 SEND LIGHT TO ADAFRUIT IO”
I just started again with a fresh download 15/3/2020 from:
https://github.com/CoreElectronics/iot-workshop/archive/master.zip
I unzipped, started a new project on Visual Studio/Platform.io
The board I am using is a FiPy which is not a listed board yet, so I chose LoPy as the closest. COULD THIS BE A PROBLEM?
I pasted the content of “Send Light to Adafruit IO.py” to a new file and named it “Send Light to Adafruit IO.py”
Without any editing, and before running or up loading I got the following error message:
invalid syntax (, line 31) pylint(syntax-error) [31,1]
Line 31 is:
< print("Publishing: {0} to {1} … ".format(str(value_string), feed), end=‘’)>
When I Run the project the output is:
Running c:\Users\vere.nicolson\OneDrive - ardentleisure.com\Documents\PlatformIO\Projects\2ndTryIOT_Tute\src\Send Light to Adafruit IO.py
Traceback (most recent call last):
File “”, line 57, in
NameError: name ‘pycom’ isn’t defined
Pycom MicroPython 1.20.1.r1 [v1.11-e4465eb] on 2019-10-23; FiPy with ESP32
Pybytes Version: 1.1.2
Type “help()” for more information.
When I upload the project the output is:
Uploading project (main folder)…
Not safe booting, disabled in settings
Uploading to /flash…
Reading file status
Deleting 2 files/folders
Removing file src/SimpleTute.py
Removing file lib/umqtt.py
[1/1] Writing file src/Send Light to Adafruit IO.py (3kb)
Upload done, resetting board…
OKets Jun 8 2016 00:22:57
rst:0x7 (TG0WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff8020,len:8
load:0x3fff8028,len:2164
load:0x4009fa00,len:19944
entry 0x400a05e8
Pycom MicroPython 1.20.1.r1 [v1.11-e4465eb] on 2019-10-23; FiPy with ESP32
Pybytes Version: 1.1.2
Type “help()” for more information.
After upload run again, get output:
Traceback (most recent call last):
File “”, line 7, in
ImportError: no module named ‘umqtt’
Pycom MicroPython 1.20.1.r1 [v1.11-e4465eb] on 2019-10-23; FiPy with ESP32
Pybytes Version: 1.1.2
Type “help()” for more information.
In the tute it says:
" Bummer. Remember I said we would use MQTT to talk to Adafruit IO? Well, our project has the file umqtt.py hidden in the lib folder,
but that file isn’t on the device yet. We need to click Upload.
This will put all the files from our project onto our device. Now. Now hit Run!"
Tried this and it didn’t work. (Because I had not used Atom as the Tute had done, I tried but there was a problem, now forgotten)
Then I copied the contents of umqtt.py from the lib folder into the Platform.io project and tried again.
there were then 4 more errors:
Unable to import ‘usocket’ pylint(import-error) [3, 1]
Unable to import ‘ustruct’ pylint(import-error) [4, 1]
Unable to import ‘ubinascii’ pylint(import-error) [5, 1]
Unable to import ‘ussl’ pylint(import-error) [62, 13]
I have searched extensively for these libraries and have not been able to find them.
Any suggestions what I should try next?
Cheers
Vere Nicolson