Skip to main content

OpenSwarm Master (openswarm-master)

The Central Linux Master SDK & CLI for the OpenSwarm Distributed Hardware-Agnostic Robotics Framework.

  • Zero Slave Control Logic: All sensor processing, state machines, kinematics, and actuator commands run here on the Master.
  • Zero External Dependencies: Pure Python 3 standard library (socket, threading, json) for instant installation on any Linux laptop, Ubuntu PC, Raspberry Pi, or Windows machine.
  • Auto-Discovery + Direct IP: Automatically discovers Slaves via UDP port 4211 (HELLO broadcast) or connects directly by IP (192.168.x.x:4210).
  • Built-In Keepalive: Sends a 200 ms background heartbeat (PING) to keep the Slave's 500 ms hardware safety watchdog active and stream 20 Hz sensor telemetry (STATE).

1. Installation

Option A: Install Directly from GitHub

pip install "git+https://github.com/raihhann/OpenSwarm.git#subdirectory=master"
git clone https://github.com/raihhann/OpenSwarm.git
cd OpenSwarm/master
pip install -e .

2. Terminal CLI (openswarm)

# Scan the local Wi-Fi network for active Slave nodes:
openswarm scan

# Blink the built-in LED ("led" on GPIO 2) on esp32_node and print live 20 Hz RSSI:
openswarm blink esp32_node --ip 192.168.0.118

3. Python API Reference

import time
from openswarm import SwarmMaster

master = SwarmMaster()

# Connect by Node ID (auto-discovers on LAN, or pass ip="192.168.0.118" directly)
bot = master.connect("esp32_node", ip="192.168.0.118")

# 1. Digital & PWM Pin Control
bot.digital_write("led", 1)                  # Named digital output HIGH
bot.digital_write("led", 0)                  # Named digital output LOW
bot.pwm_write("led", 128)                    # Named PWM output (0..255)
bot.pin_write(2, 1)                          # Direct GPIO pin number write

# 2. Motor, Servo & Stepper Control
bot.drive("drive", left=180, right=180)      # Dual H-Bridge (L298N / DRV8833)
bot.servo("gripper", angle=90)               # Hobby Servo (0..180 deg)
bot.stepper("lifter", steps=200)             # Stepper driver
bot.stop()                                   # Immediate emergency stop

# 3. Universal Bus & Custom Actuator Control (LoRa, SPI, I2C, UART)
bot.send_bus("lora_radio", data="PING_SWARM")
bot.write_reg("i2c_pwm_chip", reg=0x06, val=200)

# 4. Live 20 Hz Sensor Telemetry
print("RSSI:", bot.read("rssi"))
print("All Sensors:", bot.sensors)

master.close()

Metadata

Release files for openswarm-master 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 openswarm-master 0.1.0
File Size Uploaded Provenance Actions
openswarm_master-0.1.0.tar.gz 9.2 kB Without provenance Details for openswarm_master-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openswarm-master 0.1.0
File Interpreter ABI Platform Actions
openswarm_master-0.1.0-py3-none-any.whl Python 3 none any Details for openswarm_master-0.1.0-py3-none-any.whl

Total release size: 18.7 kB

Release files / openswarm_master-0.1.0.tar.gz

Download URL openswarm_master-0.1.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
84d9cf18800f8eef7f44d1adee39a36cd44ddaf20f37f9999e4c5d18c7cab7a3
BLAKE2b-256 checksum
How to use checksums
99a7525f18696bf7e79ebc21d5d34b3c9a517620dbce896a217a6bb669fa95c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

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

Download URL openswarm_master-0.1.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cde31193e7a2b611c44f06948cf779a8d9ee0015007ae909956911c3d3a3678c
BLAKE2b-256 checksum
How to use checksums
51467c7448cfa54e0c95ce46e6bf5d8f806658a9a3d5a8c6f3cc6f53234a7176
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

Security for openswarm-master 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