Skip to main content

This is a CLI tool for MicroPython-based embedded systems.

Project description

This tool is supports microcontrollers to which MicroPython is ported.

Help

upy

or

upy --help

Finding the serial port on a board with MicroPython

  • Explore a serially connected MicroPython device.
  • The MicroPython version and device type are printed.
  • Currently supported devices are Digi XBee3(xbee3) and Raspberry Pi Pico 2 W(pico2).
upy scan
COM3 (v1.12-1556-gcc82fa9 on 2021-06-22; XBee3 Zigbee with EFR32MG)
COM4 (v1.25.0-preview.180.g495ce91ca on 2025-01-06; Raspberry Pi Pico 2 W with RP2350)

Option Rules

  • Options and values can have spaces or omit spaces.
  • Options and values can be inserted with the = character.
<option><value>  
<option> <value>
<option>=<value> 

Environment file

  • You can omit this option by saving the environment variables required to run the tool in the current path in a .vscode/.upy file.
  • By defining SERIAL_PORT and DEVICE_TYPE in this file, you can omit the --sport and --type options to be included in each command.
SERIAL_PORT=<your_com_port_name>
DEVICE_TYPE=<your_device_type>

Example (.upy)

SERIAL_PORT=com3
DEVICE_TYPE=xbee3

Initialize Microcontroller file system

  • If you created a .vscode/.upy file in the current path, omit the --sport and --type options in all subsequent commands.
upy init

or, You can also use the --sport and --type options explicitly.

upy --sport <your_com_port_name> --type <your_device_type> init

Check list of Microcontroller file systems

  • If path is omitted, the output will be the files or directories contained in the top-level directory.
upy ls [<path>/][remote_directory]

Put PC file or directroy into Microcontroller

  • If path or remote name is omitted, a remote name identical to the local name is created in the top-level directory.
upy put <local_name> [[path][/remote_name]]

Get Microcontroller file to PC

  • Getting the current directory is not supported.
upy get <remote_file_name> <local_file_name>

Delete Microcontroller file or directory

upy rm [path/]<remote_name>

Executes the PC's MicroPython script by sequentially passing it to the Microcontroller

  • Wait for serial input/output until the script finishes
  • To force quit in running state, press Ctrl+c
upy <micropython_script_file>

or

upy run [-i | -n] <micropython_script_file>

Additional Options

  • -i: Display the pressed key in the terminal window (Echo on)
  • -n: Does not wait for serial output, so it appears as if the program has terminated on the PC side.
    • Script continues to run on Microcontroller
    • Used to check data output serially from Microcontroller with other tools (PuTTY, etc.)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

upyboard-0.8.6.tar.gz (207.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

upyboard-0.8.6-py3-none-any.whl (274.4 kB view details)

Uploaded Python 3

File details

Details for the file upyboard-0.8.6.tar.gz.

File metadata

  • Download URL: upyboard-0.8.6.tar.gz
  • Upload date:
  • Size: 207.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for upyboard-0.8.6.tar.gz
Algorithm Hash digest
SHA256 8819d6f172afd4c6111854beac85a4d3e3dbf0874b9cc0617d931a10df8a89e7
MD5 7b5ed9b254bbff14250891df3e124c64
BLAKE2b-256 f1cc065982a708c54731660de22ecc6510d9d4dc8864a0127c22123cb5ff51a0

See more details on using hashes here.

File details

Details for the file upyboard-0.8.6-py3-none-any.whl.

File metadata

  • Download URL: upyboard-0.8.6-py3-none-any.whl
  • Upload date:
  • Size: 274.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for upyboard-0.8.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e0df0f8e07dcc04b73a5f5911ded97d72f05fe9fb4d0d6b53a3a5f7064b8a803
MD5 4b697f4586f5d6ac80ac09d8830c613b
BLAKE2b-256 3166763e86682523538d9bbd60ddf81d67274fc0ca6568ccca4f7c6d1e32dff1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page