How liyafpv/linefollower32 works
This repository’s application is an embedded line-following robot. Its main workflow initializes hardware and restores settings, then responds to a start button by reading the line, calculating a steering correction, and driving the motors; Bluetooth is serviced by the main loop. The sampled code shows the main control and EEPROM persistence, but not the implementations of the sensor, PID, motor, or Bluetooth modules, so their internal behavior and some calls remain unverified.
Main entry points: main.cpp Control loop · bluetooth.cpp Bluetooth control · sensors.cpp Line sensing · pid.cpp PID correction
Components 8
Robot control
- Control loop
src/main.cpp - Line sensing
src/sensors.cpp - PID correction
src/pid.cpp - Motor drive
src/motors.cpp
User interfaces
- Bluetooth control
src/bluetooth.cpp
Persistent settings
- Settings state
src/main.cpp - EEPROM
Other components
- Operator
Connections 8
- Operator → Control loop: starts robot
src/main.cpp - Control loop → Line sensing: reads line
src/main.cpp - Control loop → PID correction: gets correction
- Control loop → Motor drive: sets speed
src/main.cpp - Control loop → Bluetooth control: services Bluetooth
src/main.cpp - Bluetooth control → Operator: accepts commands
- Control loop → Settings state: loads and saves
src/main.cpp - Settings state → EEPROM: reads and writes
src/main.cpp