How moonlight169/abu_manual_thailand works
This is firmware for a manually driven ABU Robocon robot, split across an ESP32 master and two STM32 slaves. The operator’s PS5 input is converted by the master into UART wheel and arm/box/lift commands; the wheel slave computes mecanum wheel targets and regulates motor output, while the arm slave handles manual motion and encoder-based positioning with limit and timeout safeguards. The README documents the distributed controller roles. Slave implementations are only partially excerpted, so unshown internal behavior is not expanded beyond supported relationships.
Main entry points: 0_master/main.cpp Master control · 2_slave_wheel/main.cpp Wheel control · 1_slave_arm/main.cpp Arm control · wheel.cpp Wheel assembly
Components 16
Master control
- Master control
src/0_master/main.cpp - Controller input
lib/PS5Input/PS5Input.cpp - UART protocol
lib/Protocol/protocol.cpp - Relay outputs
lib/Relay/relay.cpp
Arm slave
- Arm control
src/1_slave_arm/main.cpp - Command receiver
lib/Protocol/protocol.cpp - Arm motors
lib/Wheel/motor.cpp - Arm encoder
lib/Wheel/encoder.cpp
Wheel slave
- Wheel control
src/2_slave_wheel/main.cpp - Wheel receiver
lib/Protocol/protocol.cpp - Mecanum kinematics
lib/Kinematics/Kinematics.cpp - PID control
lib/PID/PID.cpp - Wheel assembly
lib/Wheel/wheel.cpp - Motor driver
lib/Wheel/motor.cpp - Wheel encoder
lib/Wheel/encoder.cpp
Other components
- PS5 controller
Connections 15
- PS5 controller → Master control: controls
README.md - Master control → Controller input: updates
src/0_master/main.cpp - Master control → UART protocol: encodes commands
src/0_master/main.cpp - Master control → Relay outputs: toggles
src/0_master/main.cpp - Master control → Arm control: sends UART commands
src/0_master/main.cpp - Master control → Wheel control: sends UART commands
src/0_master/main.cpp - Arm control → Command receiver: feeds bytes
src/1_slave_arm/main.cpp - Arm control → Arm motors: drives
src/1_slave_arm/main.cpp - Arm control → Arm encoder: reads counts
src/1_slave_arm/main.cpp - Wheel control → Wheel receiver: feeds bytes
src/2_slave_wheel/main.cpp - Wheel control → Mecanum kinematics: calculates RPM
src/2_slave_wheel/main.cpp - Wheel control → PID control: computes PWM
src/2_slave_wheel/main.cpp - Wheel control → Wheel assembly: sets wheel speed
src/2_slave_wheel/main.cpp - Wheel assembly → Motor driver: uses
- Wheel assembly → Wheel encoder: uses