Skip to content

Commit f1e7b11

Browse files
authored
Fixes some typos
1 parent 16604ae commit f1e7b11

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

examples/heart_rate/README.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,17 @@ The `HeartRateMonitor` class is designed to calculate heart rate from the raw se
4040

4141
## Example Usage
4242

43-
python
44-
Copy code
45-
hr_monitor = HeartRateMonitor(sample_rate=100, window_size=150, smoothing_window=10)
43+
For a complete example, see `./main.py`.
4644

4745
```python
46+
# Initialize the heart rate monitor
47+
hr_monitor = HeartRateMonitor(
48+
# Select a sample rate that matches the sensor's acquisition rate
49+
sample_rate=actual_acquisition_rate,
50+
# Select a significant window size to calculate the heart rate (2-5 seconds)
51+
window_size=int(actual_acquisition_rate * 3),
52+
)
53+
4854
# Add samples in a loop (replace the sample polling with actual sensor data retrieval)
4955
for _ in range(1000): # Example loop
5056
sample = ... # Poll the MAX30102/5 sensor to get a new sample

0 commit comments

Comments
 (0)