Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 1.82 KB

QUICKSTART.md

File metadata and controls

68 lines (48 loc) · 1.82 KB

MicroPython Nextion library

Downloads Release MicroPython License: MIT

MicroPython Nextion library


Get started

This is a quickstart guide to flash the MicroPython firmware, connect to a network and install the MicroPython Nextion library on the board

Flash firmware

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

Install package

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 example file

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