Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Interface with code running on a microprocessor via serial

Project description

uCommander - The Micro Commander

This library simplifies interfacing with code written on a microprocessor like an Arduino, Teensy, or similar devices via serial communication.

The Python code is designed to work with the uCommander Arduino library.

Basic CLI Usage

First, install the ucommander Python library with pip, ideally in a virtual environment.

$ cd myproject
$ python -m venv venv
$ pip install ucommander

After you have the ucommander library installed in your Python environment, ensure your microprocessor is attached to your host and determine what serial port you will use to communicate with it.

The listports command can help with this.

$ python -m ucommander listports
Attempting to enumerate serial ports...
/dev/cu.SOC - n/a
/dev/cu.usbmodem - USB Serial

Once you know the serial port, run the discover command to learn which commands you can run and what arguments they require.

$ python -m ucommander -p /dev/cu.usbmodem discover
Available commands:
 ledIfPi        FLOAT(4)

Finally, run the commands, providing any required arguments after the command name.

$ python -m ucommander -p /dev/cu.usbmodem ledIfPi 3.14
$ python -m ucommander -p /dev/cu.usbmodem ledIfPi 3.24

Copyright (C) 2019 Mark A Kendrick

Project details

Download files

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

Files for ucommander, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size ucommander-1.0.2-py3-none-any.whl (7.6 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size ucommander-1.0.2.tar.gz (4.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page