Skip to main content

Usage

Dependencies

pip install pyserial

PlatformIO (pio) must be in PATH for build/flash functionality.

Running

Auto-detect STM32 device (VID 0x0483):

python3 serial_commander.py

Specify port and baud rate manually:

python3 serial_commander.py --port /dev/ttyACM0 --baud 115200

If multiple STM32 devices are connected, the script presents a numbered selection menu before opening the TUI.

Default Parameter Values

Parameter

Default

erpm

2000

accel

1000

time_ms

5000

pio target

upload

pio env

can_board

Typical Workflow

  1. Connect STM32 CAN board via USB.
  2. Run python3 serial_commander.py — port is detected automatically.
  3. Adjust erpm, accel, time_ms with e/a/t as needed.
  4. Send speed (1) or profile (3) and observe STM32 response in INCOMING.
  5. Use b to build/flash directly if firmware changes are needed.
  6. Press q to quit — serial port closes cleanly.