- MicroPython build from here
I've used the REPL and upip
to put the dependencies on the board. If you are using e.g. Thonny, connect to the REPL and run Python code to join a wifi network from the board. Then:
import upip
upip.install('micropython-umqtt.robust')
upip.install('micropython-umqtt.simple')
The modules will be installed to /lib
on the board. You can also use e.g. ampy
to copy the modules onto the board.
ampy -p /dev/cu.usbmodem11301 mkdir lib
ampy -p /dev/cu.usbmodem11301 put ahtx0.py lib/ahtx0.py
Another option is to use mpremote
, the official MicroPython command-line tool.
main.py
will run a series of simple tests on the LEDs.cheerlights-demo.py
will display the Cheerlights colour on an ongoing basis. Needs to be edited with valid Wifi network values for your network.aht20-test.py
reads and prints out values from an Adafruit AHT20 Temperature and Humidity sensor connected to the I2C port.
- Bringing the bling with MicroPython (blog post, with background)
- Making a CheerDot with MicroPython (blog series, part 2)
- Using I2C in MicroPython (blog series, part 3)
- MicroPython on ESP32 Forum
- MicroPython community Slack (get an invite)