Code Examples
Real code from XBot's competition robots. Each example links to the live source on GitHub.
Available Examples
| Example | Source | Description |
|---|---|---|
| Elevator Logic | TeamXbot2025 | Calibration, sensor fusion, motion magic, soft limits |
| Swerve Drive Command | TeamXbot2026 | Teleop driving with field orientation and heading snapping |
| Simple Motor Subsystem | SeriouslyCommonLib | Base class for simple forward/reverse mechanisms |
| Maintainer Pattern | SeriouslyCommonLib | Continuous PID maintenance with human override |
How to Read These Examples
- Each example shows the key concepts with simplified code
- Click the GitHub link to see the full, up-to-date source
- Code comments explain what each section does
- Compare examples to see patterns reused across subsystems