Skip to main content

Plesty Arduino Firmata

A PLESTY device module for any board running the stock StandardFirmata sketch — Arduino Uno, Mega and the like. It drives the board's pins over USB serial: digital outputs and inputs, PWM, hobby servos and analog inputs.

The module knows pins, not instruments. An instrument wired to the board — a polarization controller, a motor driver — gets its own module that builds on this one and gives the pins their meaning (for example plesty-pcd-m02).

Prepare the board

Upload StandardFirmata once, from the Arduino IDE: File → Examples → Firmata → StandardFirmata. No other sketch is needed; this module speaks the public Firmata protocol at 57600 baud.

Installation

git clone https://gitlab.com/plesty/hub/devices/arduino/plesty-arduino-firmata.git
cd plesty-arduino-firmata
uv sync

On Linux, add your user to the dialout group for serial access (sudo usermod -aG dialout $USER, then log in again).

Usage

from plesty.arduino_firmata import Device

with Device(port="auto") as board:  # or "COM5", "/dev/ttyACM0", a USB serial number
    print(board.identity())  # StandardFirmata.ino 2.5 (Firmata) on COM5

    board.set_pin_modes([22, 23], "output")
    board.write_digital_pins(pins=[22, 23], levels=[True, False])

    board.set_pin_mode(pin=5, mode="input_pullup")
    print(board.read_digital(pin=5))  # {'level': True}
    print(board.read_analog(channel=0))  # {'counts': 512}

port="auto" picks the one genuine Arduino attached and refuses when there are none or several. A clone with a CH340 USB chip is not recognised — name its port or serial number instead.

Opening a session resets the board: every pin starts in the sketch's default and must be given a mode before it is written or read. Firmata cannot report an output pin back, so read_digital on an output answers the level this session last wrote.

port="mock" runs everything against a simulated Arduino Mega, no board needed.

Run as TCP server

Copy .env.example to .env and set DEVICE_ADDRESS, then:

uv run python -m plesty.arduino_firmata --tcp-port 5555

Open the control panel

uv sync --extra gui
uv run python -m plesty.arduino_firmata --gui

--gui drives the board from this process instead of serving it — one session is all the serial port allows, so the process does one or the other.

Metadata

Release files for plesty-arduino-firmata 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plesty-arduino-firmata 0.1.0
File Size Uploaded Provenance Actions
plesty_arduino_firmata-0.1.0.tar.gz 189.0 kB Without provenance Details for plesty_arduino_firmata-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for plesty-arduino-firmata 0.1.0
File Interpreter ABI Platform Actions
plesty_arduino_firmata-0.1.0-py3-none-any.whl Python 3 none any Details for plesty_arduino_firmata-0.1.0-py3-none-any.whl

Total release size: 226.5 kB

Release files / plesty_arduino_firmata-0.1.0.tar.gz

Download URL plesty_arduino_firmata-0.1.0.tar.gz
Size 189.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c64b8bf22442acd92c911e56ec2bd9a1e969fd12d8f725ac7a8b8a1f62b88b5b
BLAKE2b-256 checksum
How to use checksums
2ea8b113ac613294faa615723aca0bcf93d4b5d42100d40e158af91086b0207c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / plesty_arduino_firmata-0.1.0-py3-none-any.whl

Download URL plesty_arduino_firmata-0.1.0-py3-none-any.whl
Size 37.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28afed737abc2a96544cba06450f2b262b9cf78ef3633ba395bba4c8274f1744
BLAKE2b-256 checksum
How to use checksums
7c0b93c105086a0dbe006cf81948115d03c0c95f543f2b0a814474f50d86be3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for plesty-arduino-firmata 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page