MicroPython Nextion library
This is a quickstart guide to flash the MicroPython firmware, connect to a network and install the MicroPython Nextion library on the board
esptool.py --chip esp32 --port /dev/tty.SLAB_USBtoUART erase_flash
esptool.py --chip esp32 --port /dev/tty.SLAB_USBtoUART --baud 921600 write_flash -z 0x1000 esp32spiram-20220117-v1.18.bin
Connect the MicroPython device to a network (if possible)
import network
station = network.WLAN(network.STA_IF)
station.active(True)
station.connect('SSID', 'PASSWORD')
station.isconnected()
Install the latest package version of this lib on the MicroPython device
import mip
mip.install("github:brainelectronics/micropython-nextion")
For MicroPython versions below 1.19.1 use the upip
package instead of mip
import upip
upip.install('micropython-nextion')
Copy one of the provided example main.py
files to the MicroPython device.
rshell --port /dev/tty.SLAB_USBtoUART --editor nano
Perform the following command inside the rshell
to copy the Progressbar example to the MicroPython device.
cp examples/progressbar/main.py /pyboard
cp examples/boot.py /pyboard
repl