Tunnel Collapse Prevention System
================================

Files included:
- tunnel_collapse_esp32.ino       -> ESP32 firmware
- db.php                          -> Database connection
- create_tunnel_tables.sql        -> SQL schema
- insert_tunnel_data.php          -> Receives ESP32 POST data
- get_tunnel_dashboard_data.php   -> Returns latest, history, stats JSON
- index.php                       -> Main dashboard UI

SETUP
-----
1. Import create_tunnel_tables.sql into database: freelanceelectro_data
2. Upload db.php, insert_tunnel_data.php, get_tunnel_dashboard_data.php, index.php to your server folder
3. Update SERVER_URL in the ESP32 code to point to your actual insert_tunnel_data.php URL
4. In index.php, set your OpenWeather API key in the WEATHER_API_KEY constant
5. Open index.php in a browser

DEFAULT SENSOR PINS (change if needed)
--------------------------------------
- Vibration sensor analog pin: GPIO34
- Flex sensor analog pin: GPIO35
- Piezo sensor analog pin: GPIO32
- Buzzer: GPIO25
- Red LED: GPIO26
- Yellow LED: GPIO27
- Green LED: GPIO14

IMPORTANT NOTE
--------------
The 'predicted collapse days' value is a heuristic engineering indicator based on recent sensor stress.
It is NOT a certified structural engineering forecast and should be treated as an early-warning estimate only.
The dashboard includes weather and recent earthquake activity awareness, not true earthquake prediction.
