How fahmiag/scorp_10aug26 works
This is embedded firmware for an automated machine that runs vertical-axis cycles with a brush and pump, tracks cycle counts, and reports status and faults. The principal workflow is physical controls and limit switches into IO, then StateMachine coordination of motion and cycle progress, with App providing the runtime update loop and Display presenting status. Motor drivers, persistent cycle storage, pin assignments, and settings form supporting layers. The README is empty; some source excerpts show interfaces rather than runtime calls, so unverified connections are omitted or dashed.
Main entry points: App.cpp App coordinator · StateMachine.cpp Cycle state machine · AxisMotor.cpp Vertical axis motor · BrushMotor.cpp Brush motor
Components 16
Runtime control
- Firmware entry
src/main.cpp - App coordinator
src/App.cpp - Cycle state machine
src/StateMachine.cpp
Inputs and safety
- Button and limit IO
src/IO.cpp - Physical controls
Motion control
- Vertical axis motor
src/Motor/AxisMotor.cpp - Brush motor
src/Motor/BrushMotor.cpp - Pump motor
src/Motor/PumpMotor.cpp - Motor hardware
Status and persistence
- LCD display
src/Display/Display.cpp - Cycle storage
src/CycleStorage.cpp - I2C LCD hardware
- EEPROM
Hardware configuration
- Pin assignments
src/config/PinMap.h - Timing and speed settings
src/config/Config.h
Other components
- Operator
Connections 25
- Operator → Physical controls: operates
- Physical controls → Button and limit IO: reads inputs
- Firmware entry → App coordinator: starts
- App coordinator → Cycle state machine: updates
- App coordinator → Button and limit IO: updates
- Cycle state machine → Button and limit IO: reads events
- Cycle state machine → Vertical axis motor: commands motion
- Cycle state machine → Brush motor: commands motion
- Cycle state machine → Pump motor: commands pump
- App coordinator → Vertical axis motor: updates
- App coordinator → Brush motor: updates
- App coordinator → Pump motor: updates
- App coordinator → LCD display: updates status
- Cycle state machine → Cycle storage: persists counts
- LCD display → I2C LCD hardware: writes display
- Cycle storage → EEPROM: reads and writes
- Vertical axis motor → Motor hardware: drives
- Brush motor → Motor hardware: drives
- Pump motor → Motor hardware: drives
- Button and limit IO → Pin assignments: uses assignments
src/IO.cpp - Vertical axis motor → Pin assignments: uses assignments
src/Motor/AxisMotor.cpp - Vertical axis motor → Timing and speed settings: uses settings
src/Motor/AxisMotor.cpp - Brush motor → Timing and speed settings: uses settings
src/Motor/BrushMotor.cpp - Pump motor → Timing and speed settings: uses settings
src/Motor/PumpMotor.cpp - LCD display → Timing and speed settings: uses settings
src/Display/Display.cpp