如何通过 USB/串口上传文件到 MicroPython

在这篇文章中,我们将研究如何在启动时连接到无线网络

首先,安装 ampy - 一个通过串口连接修改 MicroPython 文件系统的工具。

install_ampy.sh
pip install -U adafruit-ampy

现在准备你的脚本 - 在此示例中我们将使用 main.py

将文件上传到板子:

upload_main_to_micropython.sh
ampy -p /dev/ttyUSB* put main.py

这只需要大约 2-4 秒。如果 ampy 在 10 秒后仍在运行,你可能需要


Check out similar posts by category: Embedded, MicroPython, Python