How joeearlam/fatal-deviation works
Fatal Deviation is a beetleweight robot combining an RP2040 firmware stack, custom control electronics, and mechanical CAD. Its main runtime path is RC input through IBUS decoding and drive control, with IMU feedback supporting electronic stability control, followed by four motor outputs. The board also integrates current sensing, servo connections, and RGB lighting. The README documents asynchronous task scheduling and packet-triggered drive calculations; sampled source shows the drive, IMU, IBUS, and motor abstractions, but not the task callback implementations or their full wiring.
Main entry points: bot_software.ino Task callbacks · botctrl.kicad_pcb Controller PCB · drive.h Drive controller · motor.h Motor drivers
Components 15
Firmware runtime
- Task callbacks
Code/bot_software/bot_software.ino - IBUS decoder
Code/bot_software/src/ibus.cpp - Radio mapping
Code/bot_software/bot_software.ino
Motion control
- IMU acquisition
Code/bot_software/src/IMU.h - Drive controller
Code/bot_software/src/drive.h - Motor drivers
Code/bot_software/src/motor.h
Robot electronics
- Controller PCB
Electronics/botctrl-rev2/botctrl.kicad_pcb - Drive circuitry
Electronics/botctrl-rev2/drive.kicad_sch - Board circuitry
Electronics/botctrl-rev2/botctrl.kicad_sch - Lifter servo
Electronics/botctrl-rev2/botctrl.kicad_sch - RGB lighting
Electronics/botctrl-rev2/botctrl.kicad_sch
Mechanical design
- Robot chassis
CAD/fatalDeviation.FCStd - CAD backup
CAD/fatalDeviation.20250727-103208.FCBak
Other components
- RC operator
- IBUS receiver
Connections 15
- RC operator → IBUS receiver: sends commands
README.md - IBUS receiver → IBUS decoder: sends packets
README.md - Task callbacks → IBUS decoder: reads packets
Code/bot_software/src/ibus.cpp - Task callbacks → Radio mapping: maps channels
README.md - Radio mapping → Drive controller: sets inputs
README.md - Task callbacks → Drive controller: triggers calculations
README.md - Task callbacks → IMU acquisition: updates readings
README.md - Drive controller → IMU acquisition: uses gyro data
Code/bot_software/src/drive.h - Drive controller → Motor drivers: computes commands
Code/bot_software/src/drive.h - Motor drivers → Drive circuitry: drives motors
- Controller PCB → Board circuitry: implements
- Controller PCB → Drive circuitry: integrates
- Controller PCB → Lifter servo: provides pads
README.md - Controller PCB → RGB lighting: integrates LEDs
README.md - Robot chassis → CAD backup: has backup