EpikFlux/AUTOCOMM-V2V ? reverse-engineered prompt

Reverse engineered prompt

Build me a working STM32 firmware project for a simple vehicle to vehicle alert system.

It should read GPS data from a Neo M8N module, read motion data from an MPU6050, and use an SX1278 LoRa radio to send and receive short safety messages between nearby vehicles without needing cellular service or roadside infrastructure. I want the system to detect important events like hard braking or a crash, then broadcast higher priority alerts right away, while also supporting lower priority local status and hazard messages.

Please keep it modular, with separate drivers for GPS, IMU, SPI, UART, I2C, and the radio, plus a main state machine that ties everything together. If you need current STM32 or SX1278 details, look them up online and follow the usual HAL style. Also include the basic logic for filtering out messages that are too far away, so the device only reacts to nearby vehicles.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab