https://github.com/axpaul/flightsoftware-mastodonte
Flight software for Mastodonte rocket avionics
https://github.com/axpaul/flightsoftware-mastodonte
aerospace flight-software rocket
Last synced: about 2 months ago
JSON representation
Flight software for Mastodonte rocket avionics
- Host: GitHub
- URL: https://github.com/axpaul/flightsoftware-mastodonte
- Owner: axpaul
- Created: 2025-04-06T00:42:38.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-13T11:51:42.000Z (about 1 year ago)
- Last Synced: 2025-04-13T12:38:04.140Z (about 1 year ago)
- Topics: aerospace, flight-software, rocket
- Language: C++
- Homepage:
- Size: 2.43 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flight Software Mastodonte
**FlightSoftware-Mastodonte** is the embedded flight software running on the **YD-RP2040** controller of the experimental rocket **Mastodonte**.
It acts as the onboard **flight sequencer**, managing time-critical events and hardware interfaces during the mission.
> Ā© 2025 Paul Miailhe ā Designed for safety-critical embedded rocket systems.
---
---
## Features
- Arduino framework (Earle Philhower core) on RP2040
- Built-in WS2812B RGB LED control (no external wiring)
- Passive buzzer management with programmable tone and timing
- OLED display via I²C with auto-detection
- Debug interface with optional serial logging (timeout-protected)
- CMSIS-DAP support for flashing and debugging (via SWD)
- Modular C++ architecture (timers, state machines, IO abstraction)
- Compatible with 16MB flash layout (1MB sketch / 15MB filesystem)
---
## Platform Configuration
| Parameter | Value |
|---------------------|--------------------------|
| Board | `YD-RP2040` |
| MCU | RP2040 |
| Framework | Arduino (earlephilhower) |
| Debug protocol | CMSIS-DAP (SWD) |
| Flash layout | 1MB firmware / 15MB FS |
| Clock frequency | 133 MHz |
| USB stack | TinyUSB |
| Toolchain | `toolchain-rp2040-earlephilhower` |
| Build system | PlatformIO |
---
## External Libraries
Declared in `platformio.ini`:
| Library | Version | Purpose |
|-----------------------------|-----------|------------------------------|
| Adafruit NeoPixel | `1.12.5` | WS2812B LED control |
| Adafruit SSD1306 | `2.5.7` | OLED I²C display |
| Adafruit GFX | `1.11.9` | Core graphics (OLED backend) |
---
## Synoptic
---
## š¦ Flight Sequencer States
The system is driven by a finite state machine (`sequencer.cpp`) that transitions through various mission phases.
Each state configures RGB LED color and buzzer behavior to provide **visual and audible feedback**.
| State | Color (LED) | Buzzer Pattern | Description |
|------------------|------------------|--------------------------------------|-------------|
| `PRE_FLIGHT` | š¢ Green | š Double soft beep (3s pause) | System idle on ground, RBF and JACK expected. |
| `PYRO_RDY` | š” Yellow | š 1 low beep per second | Ready for liftoff, RBF removed, JACK still in. |
| `ASCEND` | šµ Blue | š Very fast beeping | Liftoff confirmed, rocket in ascent. |
| `WINDOW` | šµ Cyan | š Rapid alert beeping | Deployment window is open (timed or triggered). |
| `DEPLOY_ALGO` | š Orange | š Alternating mid beeps | Deployment triggered via algorithm (sensor). |
| `DEPLOY_TIMER` | š Orange | š Alternating mid beeps | Deployment triggered via timer timeout. |
| `DESCEND` | š£ Magenta | š Slow and regular beeping | Descent under parachute. |
| `TOUCHDOWN` | š¢ Green (steady) | š Long beep every 30 seconds | Touchdown detected, safe recovery state. |
| `ERROR_SEQ` | š“ Red | š Rapid high-pitched beeping | System fault or invalid state transition. |
---
## š User Button USR (GP24) ā Log Dump & Erase
A user-accessible button is connected to **GPIO 24** and is checked during system boot.
- **Press and release**: Dumps log content to Serial @ **115200 baud**.
- **Press and hold for 5 seconds**: Erases the entire log file from the onboard flash memory.
This provides a fast and safe way to extract and reset logs without reflashing the system.
---