## 2 Materials and Methods
### Reactive Device Prototype Component  
The M5 Stack module integrates the MPU-6050 sensor for detecting gravitational acceleration, a WiFi module that enables connectivity to Azure Cloud services, and a location module, which provides the ability to report precise latitude and longitude coordinates, enhancing the spatial analysis of seismic activity. This connectivity facilitates real-time data requests, updates, and communication between the sensor and cloud-based analytical tools. The proposed prototype designed for this project includes a pendulum structure with a length of 110 cm, suspended in a manner that maximizes sensitivity to movement. The MPU-6050 sensor is strategically mounted 100 cm from the upper end of the pendulum, optimizing its ability to detect movements. This configuration amplifies the sensor's response to subtle oscillations. In this way, the detection of tremors associated with earthquakes, even those of low intensity, is identified. The pendulum's inherent properties allow it to amplify small vibrations, indicating seismic activity. As the pendulum swings in response to minor ground movements, the MPU-6050 captures these accelerations. Slight movements amplify small accelerations due to earthquakes. The pendulum swing freely allows the MPU-6050 to detect changes in acceleration as the pendulum moves. A threshold to detect state changes in the device is implemented based on a calibration process. Figure 4 presents the M5 Stack module, which includes WiFi and location modules, the MPU-6050 sensor, and the rod to which these components are mounted. The prototype module is also equipped with a monitor that displays the current latitude, longitude, and acceleration for demonstration purposes. Additionally, the display presents the probability of an earthquake event occurring through an Azure API request, implementing Equation (1). In this setup, a system was designed to monitor vertical positional changes in acceleration using the MPU-6050 sensor module. By continuously tracking the accelerometer's X, Y, and Z coordinates, the total acceleration is computed in real-time using Equation (5), which allows the detection of subtle variations that may indicate seismic activity:  
\[a=\sqrt{x^{2}+y^{2}+z^{2}} \tag{5}\]  
where:  
\(a\) is acceleration (the magnitude of the acceleration vector);  
\(x\)--the value corresponding to the X-axis value. This value varies between 0.53-0.55 when no event is identified;  
\(y\)--Y-axis corresponding value. It varies between 9.82-9.84 and is close to the Earth's gravitational constant (9.81 m/\(s^{2}\)), indicating that the Y-axis aligns with gravity;  
\(z\)--Z-axis values. The registered variations between 0.88-0.90 show minimal vertical movement. The observed acceleration is compared to predefined thresholds derived from typical earthquake signals to trigger an alert. The core principle is leveraging fine-grained acceleration data, particularly in the vertical axis, to amplify and identify small movements that correlate with earthquake tremors, making the system sensitive even to low-intensity seismic events. The acceleration values when the device does not record events are calculated using Equation (5) for the minimum and maximum values of the three components mentioned earlier. The minimum and maximum threshold values are amplified by a factor of 10 for greater accuracy in the analyzed values. Therefore, the normal range is established between 98.73 and 98.96. An acceleration value from the accelerometer lower than 98.73 or higher than 98.96 will trigger an alert. This multiplication and the set threshold allow the system to identify subtle changes in acceleration, ensuring that any movement significant enough to suggest an earthquake or abnormal event is captured accurately. A 6.4-s timeframe was analyzed, starting with the MPU-6050 at rest. The sampling frequency was set to 100 Hz. Subsequently, two manual movements were generated to simulate the occurrence of an event.