OpenSwarm Linux Slave Agent (openswarm-slave)
Turns any Linux SBC (Arduino UNO Q, Arduino Portenta X8, Raspberry Pi, Nvidia Jetson) or Linux Laptop into a Zero-Control-Logic OpenSwarm Slave Node.
Speaks the exact same UDP protocol (4210 / 4211) as the SwarmNode C++ microcontroller library—so the Central Linux Master (openswarm-master) controls ESP32s, RP2040s, Portenta X8s, Arduino UNO Qs, and Raspberry Pis through one unified API!
1. Installation (On Arduino UNO Q, Portenta X8, Raspberry Pi, or Linux Laptop)
# Option A: Install directly from official PyPI:
pip install openswarm-slave
# Option B: Clone and install locally for development:
git clone https://github.com/raihhann/OpenSwarm.git
cd OpenSwarm/slaves/linux
pip install -e .
2. Instant Terminal Launch (openswarm-slave CLI)
You can turn any Linux machine into an active Slave node with a single command:
openswarm-slave --id portenta_x8 --led-pin 2
Then from your Master terminal (or another terminal on the same laptop!), test it immediately using openswarm-master:
openswarm scan
openswarm blink portenta_x8 --ip 127.0.0.1
3. Declarative Python Slave Script (linux_slave_node.py)
Just like void setup() on the microcontroller, you only declare attached pins and sensors (supports both snake_case and Arduino camelCase methods):
from openswarm_slave import SwarmNode
node = SwarmNode("uno_q_node")
# Declare attached hardware ONLY — Zero Control Logic!
node.register_digital_output("led", 2)
node.register_l298n("drive", 14, 27, 26, 32, 25, 33)
node.register_ultrasonic("front_sonar", 5, 18)
node.register_cpu_temp("cpu_temp")
node.register_system_load("sys_load")
node.register_wifi_rssi("rssi")
# Start background daemon (500ms safety watchdog + 20Hz telemetry)
node.start()
4. Supported Linux Hardware Backends
- GPIO & PWM: Automatically uses
RPi.GPIO(on Raspberry Pi), Linux kernel/sys/class/gpio(on Portenta X8, Arduino UNO Q, Jetson), or Virtual GPIO Simulation Mode when testing on a standard Linux/Windows laptop. - Buses (
I2C,SPI,UART): Supports/dev/i2c-*(register_mpu6050,register_lsm6dsox,register_generic_i2c,register_i2c_actuator) and/dev/tty*(register_uart_sensor,register_uart_actuator). - Linux System Telemetry:
register_cpu_temp()(°C),register_system_load()([load_1m, ram_%]), andregister_wifi_rssi()(dBm).
Metadata
Release files for openswarm-slave 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| openswarm_slave-0.1.0.tar.gz | 12.4 kB | Without provenance | Details for openswarm_slave-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openswarm_slave-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for openswarm_slave-0.1.0-py3-none-any.whl |
Total release size: 25.0 kB
Release files / openswarm_slave-0.1.0.tar.gz
| Download URL | openswarm_slave-0.1.0.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff8904a7ec490e92e108ad85ce89823d3c61c01c14762aa36ead3c322f9ff1ee
|
|
BLAKE2b-256 checksum How to use checksums |
ab1e805435a9e5c7715cb8b375ccf06e26d9c55beb5aa9c3790c086ce741bf33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / openswarm_slave-0.1.0-py3-none-any.whl
| Download URL | openswarm_slave-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
155bd390af96f2deacfe642361e7e73fd3392ce2d5530b0d50ca328a3f479c7b
|
|
BLAKE2b-256 checksum How to use checksums |
c6f9f3c33976c61f72375cbd68a0fd224da0c81ec90b8da145e9d01e8655a047
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Security for openswarm-slave 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.