Shared firmware libraries for QRET's avionics stack.
These libraries support our STM32 nodes and the ESP32 comms board. They handle the underlying communication, logging, and storage infrastructure, allowing you to focus on application logic like reading sensors and controlling actuators.
- AimNetwork: Manages CAN bus communication, time synchronization, and network health monitoring seamlessly in the background.
- AimLogger: A lightweight logger that automatically adds timestamps and severity levels (like
DEBUGorERROR) to your messages. - AimFlashTable: Stores data directly to the board's serial flash memory. Includes a Python tool for extracting data post-flight.
We use PlatformIO to manage libraries and board configurations.
Installation: You can install the PlatformIO IDE extension for VSCode or the standalone PlatformIO Core CLI. The official PlatformIO documentation provides excellent setup guides to get you running.
Essential Commands: Whether you use the VSCode UI or the terminal, the core operations are the same. Here is how you run them from the command line:
- Compile code:
pio run - Upload to board:
pio run --target upload - Open Serial Monitor:
pio device monitor
(Tip: In VSCode, you can also use the checkmark, right arrow, and plug icons on the bottom toolbar).
- Open an example folder (e.g.,
AimNetwork/examples/stm32_canbus) as a project in PlatformIO. - Use standard Arduino functions in the main loop to handle your hardware:
int pressureValue = analogRead(A0); if (pressureValue > 500) { digitalWrite(LED_PIN, HIGH); }
- Use the logger to track events instead of
Serial.print():LOG_INFO("Pressure value is: %d", pressureValue);
- Compile and upload your code. The provided example projects are the recommended starting points for any new firmware.
- The CAN network design is intentionally narrow and predictable: mailbox-driven TX, destination filtering, bounded RX polling, and fixed-size static queues.
- STM32 uses an internal HAL-based CAN backend instead of external libraries for precise hardware control.
- ESP32 uses TWAI through the existing backend.