Welcome. Synapse is a tiny pub/sub bus that gives FTC robot code a single dedicated hardware thread and typed topics for inter-module communication.
60-second tour
- Add the dependency (see Install).
- Extend
SafeOpModeinstead ofOpMode. - Build
Nodes — one concern each (drive, intake, shooter). - Use
@SubscribedTo,@RunPeriodically,@RunnableActionto wire them up. - Anything that touches a
DcMotorEx/Servo/IMUruns on the hardware thread — read Architecture to see how.
Get Started
Concepts
- Architecture The four thread workers, what runs where, and the hardware-thread rule.
- Concepts The building blocks — architecture, orchestrator, topics, nodes, subscriptions.
- Nodes Independent units of robot logic with annotated callbacks.
- Orchestrator The bus that owns topics, nodes, and the thread workers.
- Subscriptions Three ways to consume topic values — and when each fits.
- Topics Named, typed channels for inter-module communication.
Annotations
- @OnHardwareThread Re-route a subscriber onto the single dedicated hardware thread.
- Annotations The four annotations Synapse ships, and the rules each one enforces.
- @RunPeriodically Run a method on a fixed-rate loop.
- @RunnableAction Register a named, fire-on-demand method.
- @SubscribedTo Bind a method to a topic — invoked for every value published to it.
FTC Integration
- GamepadAdaptor Publishes every gamepad button and axis onto topics at 60 Hz.
- FTC Integration SafeOpMode, HardwareActions, SafeDevice, SafeHardwareMap, GamepadAdaptor.
- HardwareActions The facade over the hardware thread — run, call, callAsync, bulkRead.
- SafeDevice A typed wrapper that routes one device's calls through the hardware thread.
- SafeOpMode Drop-in OpMode base class that wires the orchestrator and enforces the hardware-thread rule.
Recipes
Guides
- Guides Migrating existing OpModes, troubleshooting, and verifying on the robot.
- Migrating to Synapse Move an existing raw OpMode onto Synapse, subsystem by subsystem.
- Testing How Synapse is tested, and how to verify your OpMode on the bench and the field.
- Troubleshooting Every common Synapse failure with its cause and fix.
API Reference
For LLMs and agents
Every page is also served as Markdown. See llms.txt, llms-full.txt, and docs.md at the site root, or append .md to any docs URL.