How ne9n/new-timer works
Cheesehead Timer is a control-line model-aircraft throttle sequencer with Arduino firmware and a Python desktop companion. The main workflow is to configure or monitor the controller, then run a flight sequence whose state machine drives throttle while gyro sensing adjusts it and enforces safety and lap limits. The graph also preserves the documented serial-menu, calibration, LED, and desktop flashing capabilities. Internal links follow the shown firmware excerpts; desktop details and hardware links rely on README statements, since desktop source was read but not excerpted.
Main entry points: gyro.cpp Gyro Engine · cheesehead_timer.ino Firmware Loop · term.cpp Serial Terminal · state_machine.cpp Flight Sequencer
Components 17
Desktop Companion
- Desktop App
cheesehead_timer/desktop_app.py
Flight Control
- Firmware Loop
cheesehead_timer/cheesehead_timer.ino - Flight Sequencer
cheesehead_timer/state_machine.cpp - Timer Configuration
cheesehead_timer/cheesehead_timer.h
Motion and Safety
- Gyro Engine
cheesehead_timer/gyro.cpp - Gyro Interface
cheesehead_timer/gyro.h
Operator Interface
- Serial Terminal
cheesehead_timer/term.cpp - Terminal Interface
cheesehead_timer/term.h - Button Controls
cheesehead_timer/ButMenu.cpp - State LEDs
cheesehead_timer/led.cpp - LED Helpers
cheesehead_timer/led2.cpp
Controller Hardware
- EEPROM
- MPU6050
- Motor ESC
- Switches and Buttons
Other components
- Modeler
- Model Aircraft
Connections 22
- Modeler → Desktop App: configures and monitors
README.md - Desktop App → Firmware Loop: communicates serially
README.md - Desktop App → Firmware Loop: flashes firmware
README.md - Firmware Loop → Flight Sequencer: runs flight control
- Firmware Loop → Gyro Engine: updates sensing
- Firmware Loop → Serial Terminal: serves serial menu
- Button Controls → Firmware Loop: sets run state
cheesehead_timer/ButMenu.cpp - Flight Sequencer → Timer Configuration: reads settings
cheesehead_timer/state_machine.cpp - Flight Sequencer → State LEDs: sets state indication
cheesehead_timer/state_machine.cpp - Flight Sequencer → Motor ESC: writes throttle PWM
README.md - Gyro Engine → Gyro Interface: implements
cheesehead_timer/gyro.cpp - Gyro Engine → MPU6050: reads motion
README.md - Gyro Engine → Flight Sequencer: checks flight state
cheesehead_timer/gyro.cpp - Gyro Engine → Motor ESC: cuts throttle on lap limit
cheesehead_timer/gyro.cpp - Serial Terminal → Terminal Interface: implements
cheesehead_timer/term.cpp - Serial Terminal → Gyro Engine: requests safety check
cheesehead_timer/term.cpp - Serial Terminal → Timer Configuration: edits settings
cheesehead_timer/term.cpp - Serial Terminal → EEPROM: saves configuration
cheesehead_timer/term.cpp - Gyro Engine → EEPROM: persists calibration
cheesehead_timer/gyro.cpp - Firmware Loop → Switches and Buttons: reads inputs
README.md - LED Helpers → State LEDs: provides LED class
cheesehead_timer/led2.cpp - Motor ESC → Model Aircraft: controls motor
README.md