|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
The STM32 flight-computer scaffold lives in Core/ on the flight-computer branch. Its portable self-test interface and host tests are documented in Core/README.md. The ESP32 build instructions below do not build or validate that target.
ESP32 firmware for every avionics board in the Diablo rocket — the code that reads the sensors, talks to the ground DAQ server over Ethernet, and runs the on-board abort logic during a hotfire. This directory is a subtree of calstar/DiabloAvionics, vendored into the STAR monorepo.
Built with PlatformIO; the boards are ESP32-S3 (and a few C6/C3) running the Arduino framework.
Each board type runs a small state machine: it boots, self-tests its ADC and sensors, waits for the server to send its configuration, then streams sensor data and exchanges heartbeats. If it loses the server's heartbeat it can abort autonomously. The packets it sends and receives are defined once, in lib/DAQv2-Comms (reached here via the symlink libraries/DAQv2-Comms), so the firmware and the daq-server always agree on the wire format.
The canonical flight code lives under Hotfire_Code/. Everything else is either a shared library, a bench-test sketch, a calibration tool, or archived hardware.
Top-level directories like PT_Board/, RTD_Board/, Encoder_Board/, and the *_Testing/ trees are older bring-up code kept for reference. New flight work goes in Hotfire_Code/.
libraries/ holds the Arduino libraries each board links against:
| Library | Origin | Notes |
|---|---|---|
| DAQv2-Comms | STAR (symlink) | wire protocol — see lib/DAQv2-Comms |
| EthernetHandler | STAR | W5500 Ethernet setup/config helper |
| STAR_MCP3201 | STAR | MCP3201 SPI ADC driver |
| STAR_ISM330DH | STAR fork of SparkFun | IMU driver + STAR wake-up extensions |
| STAR_LIS3DH | Adafruit (upstream) | accelerometer driver, unmodified |
| ads126X | upstream (Molorius) | ADS126x precision ADC driver |
The STAR forks and upstream libraries keep their own licenses; don't reformat or "clean up" the vendored ones.
PlatformIO reads each project's platformio.ini. The shared environment bases (board, platform, build flags) live in platformio-common.ini.
Install PlatformIO once:
Host unit tests (fast, no hardware):
Covers the sensor/actuator state machines, ADS126X self-test, DAQv2-Comms packet round-trips, and sensor data collection.
Compile-check / build a flight project:
Each flight board sets its identity (BOARD_ID) at compile time via its platformio.ini / common/hotfire_config.h; two boards must not share an ID (they would collide on the same static IP). Updates can also be pushed over Ethernet — see Ethernet OTA Testing/.