Skip to content

Commit eb54ff1

Browse files
committed
Example documentation
1 parent d4074b3 commit eb54ff1

File tree

1 file changed

+10
-10
lines changed
  • examples/vibration-anomaly-detection

1 file changed

+10
-10
lines changed

examples/vibration-anomaly-detection/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The **Fan Vibration Monitoring** example creates a smart vibration detector that
66

77
## Description
88

9-
Monitor the physical status of a fan in real-time. This example uses a Modulino sensor to capture acceleration data and a dedicated software brick to detect vibration anomalies.
9+
Monitor the physical status of a fan in real-time. This example uses a Modulino Movement to capture acceleration data and a dedicated Brick to detect vibration anomalies.
1010

1111
Unlike simple threshold detectors, this app provides:
1212
* **Live Data Visualization:** A real-time scrolling plot of X, Y, and Z acceleration.
@@ -26,7 +26,7 @@ The example uses the following Bricks:
2626

2727
- Arduino UNO Q (x1)
2828
- Modulino Movement (LSM6DSOX) (x1)
29-
- Modulino Base and Cables
29+
- Qwiic Cable (x1)
3030
- USB-C® to USB-A Cable (x1)
3131

3232
### Software
@@ -37,7 +37,7 @@ The example uses the following Bricks:
3737

3838
## How to Use the Example
3939

40-
1. Connect the Modulino Movement sensor to the Arduino UNO Q via the Modulino Base.
40+
1. Connect the Modulino Movement sensor to the Arduino UNO Q via the Qwiic connector.
4141
2. Run the App.
4242
3. Open the App on your browser.
4343
4. Observe the **Accelerometer Data** chart to see the live vibration waveforms.
@@ -50,15 +50,15 @@ Here is a brief explanation of the full-stack application:
5050

5151
### 🔧 Backend (main.py)
5252

53-
- Initializes the `VibrationAnomalyDetection` brick.
53+
- Initializes the `vibration_anomaly_detection` Brick.
5454
- Receives raw sensor data via `Bridge`, converts it from gravity units ($g$) to acceleration ($m/s^2$), and forwards it to the UI for plotting.
55-
- Accumulates samples in the detection brick.
55+
- Accumulates samples in the detection Brick.
5656
- Listens for threshold overrides from the UI to update the detection sensitivity in real-time.
5757
- Broadcasts anomaly alerts containing the anomaly score and timestamp.
5858

5959
### 💻 Frontend (index.html + app.js)
6060

61-
- **Real-time Plotting:** Uses an HTML5 Canvas to draw the live X, Y, Z acceleration waveforms at 60fps.
61+
- **Real-time Plotting:** Uses an HTML5 Canvas to draw the live X, Y, Z acceleration waveforms.
6262
- **Interactive Controls:** Sends slider values to the backend to tune the algorithm parameters.
6363
- **Alert System:** visualizes anomalies with status icons and maintains a chronological list of recent detections.
6464

@@ -96,19 +96,19 @@ Once the application is running, you can access it from your web browser. At tha
9696
```python
9797
def record_sensor_movement(x: float, y: float, z: float):
9898
try:
99-
# Convert g -> m/s^2 for the detector and UI
99+
# Convert g -> m/s^2 for the detector
100100
x_ms2 = x * 9.81
101101
y_ms2 = y * 9.81
102102
z_ms2 = z * 9.81
103103

104-
# Forward data to UI for the live plot
104+
# Forward raw data to UI for plotting
105105
ui.send_message('sample', {'x': x_ms2, 'y': y_ms2, 'z': z_ms2})
106106

107-
# Forward samples to the vibration_detection brick for analysis
107+
# Forward samples to the vibration_detection Brick
108108
vibration_detection.accumulate_samples((x_ms2, y_ms2, z_ms2))
109109

110110
except Exception as e:
111-
logger.exception(f"Error: {e}")
111+
logger.exception(f"record_sensor_movement: Error: {e}")
112112
```
113113

114114
- **Handling Dynamic Thresholds.**

0 commit comments

Comments
 (0)