Phase 1: The Basic Hardware & App Foundation
- The Starting Point: We began by wiring a standard ESP32 directly to the MPU6050 using basic I2C pins . The code simply read raw motion values and streamed them over a basic Bluetooth connection to our first Flutter app version, which only displayed numbers on a screen with no automatic messaging features.


.png)
Phase 2: Upgrading the Circuit & Local Fail-Safes
- The Progression: Real-world driving tests showed that engine vibrations corrupted our threshold calculations. We upgraded the circuit by adding a tactile push-button and a piezo speaker (buzzer). We coded a 15-second local countdown window: if a high threshold was crossed, the speaker would blare an alarm, giving a conscious driver a chance to press the physical button to cancel a false alarm.

Phase 3: The Circuit Fix & Avoiding Core Bluetooth Pins
- The Technical Challenge: During testing, we noticed the ESP32 would randomly crash or fail to boot when the button or speaker pins were connected. We realized we had accidentally used strapping pins or internal core pins that interfere with the ESP32’s internal Bluetooth/Boot configurations. We fixed this by shifting our hardware interrupts and GPIO connections to completely safe, non-interfering pins (like $GPIO 12, 13, or 14$).


Phase 4: Integrating the Edge AI Brain
The Intelligence Shift: Static thresholds kept failing on real Indian roads due to harsh potholes and speedbreakers during active driving. We collected real driving data and trained an offline TinyML neural network via Edge Impulse. The model was compressed and flashed directly onto the ESP32 to accurately isolate true vehicle crashes from common road noise using zero cloud internet.






Phase 5: The Final App Update (Autonomous Offline Messaging)
- The Final Polish: We upgraded our Flutter mobile application to work as a silent background safety asset. The exact millisecond the onboard Edge AI verifies a real crash pattern, it bypasses the internet and sends a high-priority packet to the app. The updated Flutter app instantly queries the phone’s native GPS chip and autonomously broadcasts an offline cellular emergency SMS with a live Google Maps location link—saving the user before structural forces can destroy the phone.








