Quake-Ready is a smart application that uses an IoT device (Python STEM Board) with a 3-axis accelerometer to detect ground vibrations and sound sensors to find trapped individuals. It provides real-time alerts with visual and sound notifications. The app also shows resource data (hospitals, camps, population) to help with response planning and coordination
STEM Python Board
Initialize mPython, Wi-Fi, MQTT, sensors
Display message on OLED
While True:
Read and publish sound and accelerometer data
If sound > threshold:
Display "ALERT: High sound" and trigger notifications
If acceleration > threshold:
Display "ALERT: Earthquake" and trigger notifications
Plot sound and acceleration data with color-coded severity
Wait for a few seconds
End loop
APPLICATION LOGIC
Initialize MQTT client and connect to broker
Subscribe to sound and accelerometer topics
Define thresholds for sound and acceleration
Set up data storage (sound_data, acceleration_data)
Define on_connect callback to subscribe to topics
Define on_message callback to process incoming data and store in respective queues
Define function to plot sound data:
Plot sound as bar chart with color based on severity (green, yellow, red)
Define function to plot accelerometer data:
Plot acceleration as bar chart with color based on severity (yellow, orange, red)
Run a loop (e.g., 10 times):
Plot sound and accelerometer data
Pause for 5 seconds before repeating