pymata-express
A Python Protocol Abstraction Library For Arduino Firmata using Python asyncio
What it is and what it does
Pymata-Express is an asyncio-based Firmata protocol client that lets you control Arduino boards from Python by reading and writing digital and analog pins, interfacing with sensors like HC-SR04 ultrasonic and DHT temperature/humidity modules, and driving stepper motors. It communicates with an Arduino running the FirmataExpress sketch (an enhanced version of StandardFirmata 2.5.8) over a serial connection, translating Python method calls into Firmata protocol messages.
The library uses an event-driven model: you set a pin mode and either attach a callback function to be invoked when the pin's value changes, or poll the pin's last recorded state. Each event is timestamped and logged. The single runtime dependency is pyserial for serial communication. However, the project has been archived and unmaintained since 2022-03-24, so it is suitable only for maintaining existing Arduino automation projects or educational use where you control the firmware version.
Use it for:
- Monitor digital input pins (buttons, switches) on an Arduino and trigger Python callbacks when state changes occur.
- Read analog sensor values (potentiometers, light sensors) and log or process them in real time.
- Control stepper motors or piezo speakers connected to an Arduino from a Python asyncio application.
- Build educational robotics or home automation projects that integrate Arduino hardware with Python logic.
- Integrate HC-SR04 ultrasonic distance sensors or DHT humidity/temperature sensors into a Python data collection pipeline.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
An asyncio-based Python client for controlling Arduino boards via the Firmata protocol, supporting digital/analog I/O, sensors, and motors through callback-driven or polled event handling.
No, unless you are maintaining an existing codebase. The project is archived and abandoned since 2022-03-24 with no active maintenance. While it has low install friction and no known vulnerabilities, the lack of updates means it will not receive bug fixes or compatibility improvements for newer Python or Arduino versions. For new Arduino–Python projects, consider actively maintained alternatives or direct serial communication with pyserial.
Install
pymata-express on PyPI
pip
pip install pymata-expressuv
uv add pymata-expresspoetry
poetry add pymata-expressInstalling pymata-express
Before you install
Low install friction with a single runtime dependency (pyserial). However, the project is archived and abandoned since 2022-03-24, with no maintenance for an extended period—use only if you need to maintain existing code or are certain the FirmataExpress sketch on your Arduino is stable.
License in practice
Licensed under GNU Affero General Public License v3 or later (AGPLv3+), which requires that any modifications or derivative works be released under the same license and that source code be made available to users. This is a copyleft obligation that may restrict commercial or proprietary use.
Quickstart
import asyncio
from pymata_express import pymata_express
async def main():
board = pymata_express.PymataExpress()
await board.set_pin_mode_digital_input(12, callback=my_callback)
await asyncio.sleep(1)
await board.shutdown()
asyncio.run(main())
Requires an Arduino running the FirmataExpress sketch (or compatible StandardFirmata) and a serial connection; pyserial must be able to detect and open the device port.
Verify before relying
- Whether the FirmataExpress sketch remains compatible with current Arduino hardware and IDE versions
- Current state of the GitHub repository and whether community forks are actively maintained
- Compatibility with Python versions beyond 3.7 (classifiers list 3.7 but requires_python is unspecified)
Package facts
| License | GNU Affero General Public License v3 or later (AGPLv3+) (agpl) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pyserial |
| Maintenance | abandoned — 1,834 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 73,938/month — #14,905 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pymata_express-1.21-py2.py3-none-any.whl
Keywords: Firmata, Arduino, Protocol, Python, asyncio
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pigpioProvides Python access to the pigpio daemon for…
permissive · top 15,000 on PyPI
nidaqmxProvides a Python API to control and acquire…
permissive · top 15,000 on PyPI
pyadi-iiopyadi-iio provides Python classes that wrap…
permissive · top 15,000 on PyPI
Adafruit-BlinkaAdafruit-Blinka emulates CircuitPython APIs on…
permissive · top 15,000 on PyPI
RPi.GPIORPi.GPIO provides Python control over Raspberry…
permissive · top 15,000 on PyPI
pybraviaProvides an async Python interface to control…
permissive · top 15,000 on PyPI
directvAsynchronous Python client for controlling and…
permissive · top 15,000 on PyPI
pyserial-asyncioAdds async/await support to pyserial for…
permissive · top 15,000 on PyPI
iaqualinkAsynchronous Python library for monitoring and…
permissive · top 15,000 on PyPI
aioresponsesMocks HTTP requests made by aiohttp's…
permissive · top 5,000 on PyPI