Linux command
mpremote 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Connect to device
mpremote
Run Python code
mpremote exec "[print('hello')]"
Copy file to device
mpremote cp [local.py] :[remote.py]
Copy file from device
mpremote cp :[remote.py] [local.py]
Run script on device
mpremote run [script.py]
Enter REPL
mpremote repl
List files on device
mpremote ls
Mount local directory
mpremote mount [.]
说明
mpremote is the MicroPython remote control tool. It manages MicroPython devices. The tool copies files, runs code, and provides REPL access. Works over USB serial.
参数
- connect _DEVICE_
- Connect to specific device.
- exec _CODE_
- Execute Python code.
- cp _SRC_ _DST_
- Copy files (: prefix for device).
- run _FILE_
- Run local script on device.
- repl
- Enter interactive REPL.
- --help
- Display help information.
FAQ
What is the mpremote command used for?
mpremote is the MicroPython remote control tool. It manages MicroPython devices. The tool copies files, runs code, and provides REPL access. Works over USB serial.
How do I run a basic mpremote example?
Run `mpremote` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does connect _DEVICE_ do in mpremote?
Connect to specific device.