Embedded 101: MicroPython Package Management — Hidden Tips & Quick Start
It introduces Python PyPI packaging, and explains MicroPython library installation via mip/mpremote and how to build custom MicroPython packages.
【Preliminary Note】The original hardware example in this article was written based on the RP2040. The actual hardware used in this hands-on demonstration features the W55RP20 as the main controller chip. The circuit logic and UF2 flashing operation principles are universally applicable, with only the main controller model differing. The original chip model mentioned in the circuit descriptions below is provided for reference purposes only.
1. Installation Package Process
mip. install (GitHub link of the corresponding file) command to complete the installation.sys. path. append ('/lib')) before you can directly use import to import modules.mpremote mip install <package name/link/repository address>.--target-path (to specify the installation path), --no-mpy (to disable compiling into. mpy files), --index, and others.2. Create and distribute your own packages and modules
__init__. py (to mark as a package), README. md (documentation), LICENSE (open source license), examples folder (sample code), etc.upip), or publish to a GitHub repository for download.