Skip to content

Comments

Serial Bus #1: Add Serial Bus Module to handle multiple ESPs#175

Merged
JensOgorek merged 30 commits intomainfrom
serial_bus
Dec 18, 2025
Merged

Serial Bus #1: Add Serial Bus Module to handle multiple ESPs#175
JensOgorek merged 30 commits intomainfrom
serial_bus

Conversation

@JensOgorek
Copy link
Contributor

@JensOgorek JensOgorek commented Nov 21, 2025

This PR adds a SerialBus module so multiple ESP32-based Lizard nodes can share one UART link with a single coordinator that orchestrates traffic round-robin style.

Commands:

  • bus.send(receiver, payload) – enqueue a point-to-point frame (payload must fit in 256 bytes, no newlines).
  • bus.make_coordinator(peer_ids...) – marks this node as coordinator and loads the peer poll order.

How it works:
Each instance runs a background FreeRTOS task that reads $$sender:receiver$$payload frames from UART, parses control words (__POLL__, __DONE__, __BUS_RESPONSE__), and either executes remote commands or enqueues outbound traffic. Coordinators open transmit windows for their peers in turn and enforce timeouts; non-coordinators only transmit while polled, then reply with __DONE__ once their queue is flushed.

@JensOgorek JensOgorek changed the title Add Serial Bus Module to handle multiple ESPs Serial Bus: Add Serial Bus Module to handle multiple ESPs Nov 21, 2025
@JensOgorek JensOgorek changed the title Serial Bus: Add Serial Bus Module to handle multiple ESPs Serial Bus #1: Add Serial Bus Module to handle multiple ESPs Nov 21, 2025
@JensOgorek JensOgorek marked this pull request as ready for review November 28, 2025 14:01
@JensOgorek JensOgorek merged commit 4237e2f into main Dec 18, 2025
@JensOgorek JensOgorek deleted the serial_bus branch December 18, 2025 15:10
@JensOgorek JensOgorek mentioned this pull request Dec 18, 2025
31 tasks
@JensOgorek JensOgorek added this to the 0.9.0 milestone Dec 18, 2025
JensOgorek added a commit that referenced this pull request Jan 26, 2026
- Bring in Serial Bus Module (#175)
- Bring in checksum mismatch delay removal (#183)
- Bring in ODrive motor temperature property (#174)
- Resolve conflicts in module.h (keep both rmd_axis and serial_bus)
- Resolve conflict in sdkconfig.defaults.esp32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants