PicoPWM
Python client and local dashboard for 24-channel PicoPWM boards. Runs on Windows, Linux, and macOS.
PyPI · Source · Firmware · Report an issue
Python talks USB HID to the connected Pico or Pico 2; the browser talks to Python.
Requirements
- Python 3.10+, a USB data cable, and compatible PicoPWM firmware.
- OS permission to access the board. Linux users should follow the HID permissions guide.
Firmware compatibility follows HID report layouts and advertised capabilities, not a minimum version. No minimum hardware-verified firmware release has been established; unsupported identities or layouts produce protocol errors.
Quick Start
Create and activate a virtual environment:
Linux/macOS
python3 -m venv .venv
. .venv/bin/activate
Windows PowerShell
py -m venv .venv
.\.venv\Scripts\Activate.ps1
If PowerShell blocks activation, use the environment's executables directly:
.\.venv\Scripts\python.exe -m pip install picopwm
.\.venv\Scripts\picopwm.exe
Install and launch:
python -m pip install picopwm
picopwm
Connect the board, open http://127.0.0.1:5000/, and select it; use Rescan
if needed. Ctrl+C stops the service, not generator outputs. Use the
stop procedure
before leaving the board.
Before driving outputs, check running roles and the hardware setup guide; GPIOs are 3.3 V only. The dashboard guide covers channel editing and saving.
Use from Python
Read status without changing outputs:
from picopwm.device.client import PicoPwmHid
client = PicoPwmHid()
try:
state = client.status()
if not state["connected"]:
raise RuntimeError(state["error"])
print(state["identity"])
for channel in state["channels"]:
print(channel)
finally:
client.close()
with PicoPwmHid() as client: also closes handles automatically, but does
not stop outputs. After checking roles and wiring,
call client.set_channel(0, 1000, 50) to request 1 kHz / 50% duty, or
client.stop() to stop all generators. Read back realized state.
status() returns connection errors; rejected or unconfirmed commands raise
DeviceError. Inspect state before retrying. A stalled USB transfer can delay
other calls, including stop; disconnect power if output state is uncertain.
See
Native HID Qualification
for platform-specific transfer checks.
Dashboard Configuration
Set these before starting picopwm; direct Python clients select boards through open_device() instead.
| Variable | Purpose | Default |
|---|---|---|
PICOPWM_SERIAL |
Preferred board serial | Automatic selection |
PICOPWM_DEVICE_PATH |
Preferred HID path | Automatic selection |
PICOPWM_HOST |
Listen address | 127.0.0.1 |
PICOPWM_PORT |
Listen port | 5000 |
PICOPWM_TOKEN |
API access token | Unset |
Non-loopback binding requires PICOPWM_TOKEN; the page prompts for it.
There is no TLS. Keep the server off untrusted networks; use an HTTPS reverse
proxy for remote access.
Troubleshooting
- Board missing or inaccessible: check the cable, firmware, HID permissions, and board selection. Scripts with multiple boards must select a serial number or device path.
- Control unavailable: check the running bank role and firmware capabilities; monitors cannot be driven.
- Readings: temperature is an uncalibrated internal estimate; service load is not CPU utilization.
The old picopwm-web command remains an alias.
For other problems, see
troubleshooting.
Include package/firmware versions, OS, and the exact error in bug reports.
Development
License
Metadata
Release files for picopwm 0.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| picopwm-0.6.1-py3-none-any.whl | Python 3 | none | any | Details for picopwm-0.6.1-py3-none-any.whl |
Release files / picopwm-0.6.1-py3-none-any.whl
| Download URL | picopwm-0.6.1-py3-none-any.whl |
|---|---|
| Size | 44.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
068aa0c5a935c7d1567119ed3cafc17dd5a1e4fed752bc85d181ffbfd7e00805
|
|
BLAKE2b-256 checksum How to use checksums |
63cd4d885ab4c6ab9698fa0e6f7154ce094e738983d004af1fcf145f7d91e1cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for picopwm 0.6.1
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.
Full provenance
1 file in this release has been uploaded with provenance metadata.
Attestation for picopwm-0.6.1-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA 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.