How maximtrofimov/stm32-rc-car works
This is a dual-STM32 RC car: a handheld remote samples joystick input, encodes mode and steering/throttle into a packet, and transmits it over NRF24L01; the car MCU receives manual controls or runs obstacle-avoidance behavior. The car firmware also includes sensor capture and motor/servo drivers. README documents separate custom remote and car PCB designs and mechanical CAD. Main-loop and sensor/avoidance excerpts show key calls; several driver implementations and all PCB/CAD internals were not sampled, so those relationships are included only where the README supports them.
Main entry points: car_mcu/main.c Car main loop · remote_mcu/main.c Joystick and mode · NRF24L01.c Remote radio · autonomous.c Obstacle avoidance
Components 13
Remote firmware
- Joystick and mode
Firmware/remote_mcu/main.c - Remote radio
Firmware/remote_mcu/NRF24L01.c
Car control
- Car main loop
Firmware/car_mcu/main.c - Obstacle avoidance
Firmware/car_mcu/autonomous.c
Car hardware drivers
- Ultrasonic sensing
Firmware/car_mcu/HCSR04.c - Car radio
Firmware/car_mcu/NRF24L01.c - Motor driver
Firmware/car_mcu/TB6612FNG.c - Servo driver
Firmware/car_mcu/SG90.c
Physical design
- Car PCB
Hardware/car_pcb/car_pcb.kicad_sch - Remote PCB
Hardware/remote_pcb/remote_pcb.kicad_sch - Mechanical CAD
Mechanical
Other components
- Operator
- NRF24 link
Connections 11
- Operator → Joystick and mode: moves joystick
README.md - Joystick and mode → Remote radio: transmits packet
Firmware/remote_mcu/main.c - Remote radio → NRF24 link: sends wirelessly
README.md - NRF24 link → Car radio: delivers packet
README.md - Car main loop → Car radio: receives packet
Firmware/car_mcu/main.c - Car main loop → Motor driver: sets throttle
Firmware/car_mcu/main.c - Car main loop → Servo driver: sets steering
Firmware/car_mcu/main.c - Car main loop → Obstacle avoidance: runs autonomous
README.md - Obstacle avoidance → Ultrasonic sensing: reads distances
Firmware/car_mcu/autonomous.c - Remote PCB → Joystick and mode: hosts MCU
README.md - Car PCB → Car main loop: hosts MCU
README.md