How anandakrishnano-bit/smarthelmet-app works
Smart Helmet OS monitors rider safety across Arduino hardware, an Android companion, and a browser dashboard. Sensors feed the Arduino, which emits telemetry over Bluetooth; the Android app monitors that stream and handles safety decisions, location, SOS dispatch, and ride records. Separately, the Python bridge can read the Bluetooth serial stream and broadcast telemetry to the web dashboard, which presents live status and offers its own SOS controls. The README documents the product flow and major capabilities; some implementation links are omitted where excerpts do not show the caller.
Main entry points: SmartHelmetService.java Safety Service · MainActivity.java Mobile Dashboard · app.js Dashboard Logic · smart_helmet.ino Sensor Firmware
Components 21
Helmet Hardware
- Helmet Sensors
arduino/smart_helmet.ino - Sensor Firmware
arduino/smart_helmet.ino
WebSocket Bridge
- Serial Bridge
backend.py - WebSocket Server
backend.py
Web Dashboard
- Dashboard Logic
app.js - Dashboard UI
index.html - Browser Settings
app.js
Android Safety App
- Mobile Dashboard
app/src/main/java/com/smarthelmet/app/MainActivity.java - Safety Service
app/src/main/java/com/smarthelmet/app/SmartHelmetService.java - Bluetooth Reader
app/src/main/java/com/smarthelmet/app/BluetoothReader.java - Decision Engine
app/src/main/java/com/smarthelmet/app/DecisionEngine.java - Telemetry Packet
app/src/main/java/com/smarthelmet/app/TelemetryPacket.java - Telemetry Graph
app/src/main/java/com/smarthelmet/app/GraphView.java
Settings And Journal
- Settings Screen
app/src/main/java/com/smarthelmet/app/SettingsActivity.java - App Preferences
app/src/main/java/com/smarthelmet/app/SettingsActivity.java - Ride Logger
app/src/main/java/com/smarthelmet/app/BlackBoxLogger.java - Ride Journal
app/src/main/java/com/smarthelmet/app/BlackBoxActivity.java
Other components
- Rider
- Browser Location
- SMS Network
- Device Location
Connections 23
- Helmet Sensors → Sensor Firmware: provide readings
README.md - Sensor Firmware → Serial Bridge: emit serial data
README.md - Sensor Firmware → Bluetooth Reader: emit Bluetooth data
README.md - Serial Bridge → WebSocket Server: broadcast telemetry
backend.py - WebSocket Server → Dashboard Logic: send telemetry
README.md - Dashboard Logic → Dashboard UI: updates
app.js - Dashboard Logic → Browser Settings: reads and writes
app.js - Dashboard Logic → Browser Location: requests location
app.js - Rider → Dashboard Logic: controls SOS
app.js - Rider → Mobile Dashboard: uses app
README.md - Mobile Dashboard → Safety Service: starts and binds
app/src/main/java/com/smarthelmet/app/MainActivity.java - Safety Service → Bluetooth Reader: connects through
app/src/main/java/com/smarthelmet/app/SmartHelmetService.java - Bluetooth Reader → Telemetry Packet: parses readings
README.md - Safety Service → Decision Engine: uses state machine
README.md - Mobile Dashboard → Telemetry Graph: displays telemetry
app/src/main/java/com/smarthelmet/app/MainActivity.java - Mobile Dashboard → Settings Screen: opens settings
README.md - Settings Screen → App Preferences: saves settings
app/src/main/java/com/smarthelmet/app/SettingsActivity.java - Safety Service → Ride Logger: records ride events
README.md - Mobile Dashboard → Ride Journal: opens journal
README.md - Ride Journal → Ride Logger: reads log entries
app/src/main/java/com/smarthelmet/app/BlackBoxActivity.java - Safety Service → SMS Network: dispatches SOS
app/src/main/java/com/smarthelmet/app/SmartHelmetService.java - Safety Service → Device Location: acquires coordinates
README.md - Device Location → SMS Network: location in alert