Install MicroPython ported packages using upip, with network connection (on ESP32-C3)
upip package manager
can be used to install a distribution package on a MicroPython port with
networking capabilities.
In ESP32 ports, we have to connect to WiFi
network before run upip to install package. It's a simple script to connect
WiFi network and return to REPL, such that you can run upip in REPL Shell.
"""
Just a simple MicroPython script to connect to WiFi network,
such that you can return to REPL with network connected.
"""
import network
import time
sta_if = network.WLAN(network.STA_IF)
sta_if.active(True)
if sta_if.isconnected():
sta_if.disconnect()
time.sleep(1)
sta_if.connect('ssid', 'password')
This video show how to connect to WiFi network and install micropython-pystone_lowmem package using upip, run on ESP32-C3/MicroPython v1.19.1.
(micropython-pystone_lowmem is a benchmark tool ported to MicroPython.)
(micropython-pystone_lowmem is a benchmark tool ported to MicroPython.)
Alternatively, you can install packages in Thonny Python IDE.
Comments
Post a Comment