A library to discover Arduino boards connected via serial ports
Project description
Arduino Disco
A lightweight Python library and CLI tool to discover Arduino boards connected via serial ports. It matches connected devices against the Arduino board database to provide FQBN (Fully Qualified Board Name) and architecture information.
The project is available on GitHub: https://github.com/christoph2/arduino-disco
Features
- Automated Discovery: Scans serial ports and identifies connected Arduino-compatible hardware.
- Board Database Matching: Uses your local Arduino installation to identify boards.
- Heuristic Scoring: Smart matching based on VID/PID, product strings, and manufacturer information.
- CLI Tool: Quick overview of connected boards directly from the terminal.
- Python API: Easy integration into your own Python projects.
Installation
pip install arduino-disco
Usage
Command Line Interface (CLI)
Run the tool to list discovered boards:
arduino-disco
To include all serial ports (even unrecognized ones), use the --all or -a flag:
arduino-disco --all
Example output for --all:
Port Board FQBN Core
COM6 Unknown - -
COM11 Unknown - -
COM5 Unknown - -
COM7 Unknown - -
COM10 Arduino Uno arduino:avr:uno avr
COM4 Arduino Uno arduino:avr:uno avr
COM8 ESP32 Family Device esp32:esp32:esp32_family esp32
Example output (default):
Port Board FQBN Core
COM4 Arduino Uno arduino:avr:uno avr
COM8 ESP32 Family Device esp32:esp32:esp32_family esp32
Python API
You can use the library in your own scripts:
from arduinodisco import discover_boards
# Get only recognized boards
boards = discover_boards()
for entry in boards:
print(f"Found {entry.board.name} on {entry.port.device}")
print(f"FQBN: {entry.board.fqbn}")
# Get all ports, including unrecognized ones
all_ports = discover_boards(include_all_ports=True)
Development
Prerequisites
Install development dependencies:
pip install -e ".[dev]"
Versioning
To bump the version (using bumpver):
bumpver update --patch
Pre-commit Hooks
To ensure code quality, install the pre-commit hooks:
pre-commit install
License
This project is licensed under the MIT License - see the pyproject.toml for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arduino_disco-0.1.0.tar.gz.
File metadata
- Download URL: arduino_disco-0.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b47d3891850031d964f5014b59da5c2e3dc16f465b470e7ac171f6d9b84a582
|
|
| MD5 |
87989c0a47b5d8bc039f3a67bd7cedc9
|
|
| BLAKE2b-256 |
b657b1b293fe796cd99008abea804262ec720483cf21714f0501cc48bdb5ca1a
|
File details
Details for the file arduino_disco-0.1.0-py3-none-any.whl.
File metadata
- Download URL: arduino_disco-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d07f98558f687f20bc61eacd20663e64ec046e9cae1790708f4db5a4b1142e42
|
|
| MD5 |
53874bf0c7980204a330e967413aa0ed
|
|
| BLAKE2b-256 |
3571ed67dfb926384bbb4d73905386f971bc404d7fb9a823e5ad4c90c9e1853d
|