Skip to content

Commit efc4b3e

Browse files
Update docs
1 parent f3f0f6c commit efc4b3e

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pip3 install mkdocs mkdocs-material markdown-include
1+
#pip3 install mkdocs mkdocs-material markdown-include
22
mkdocs build

docs/frameworks/sensor-manager.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,21 @@ class GestureDetector(Activity):
224224

225225
## Calibration
226226

227-
Calibration removes sensor drift and improves accuracy. The device must be **stationary** during calibration.
227+
Calibration removes sensor drift and improves accuracy. The device must be **stationary on a flat surface** during calibration.
228228

229-
### Manual Calibration
229+
### Using the Built-in Calibration Tool
230+
231+
The easiest way to calibrate your IMU is through the Settings app:
232+
233+
1. Open **Settings****IMU****Calibrate IMU**
234+
2. Place your device on a flat, stable surface
235+
3. Tap **Calibrate Now**
236+
4. Keep the device still for ~2 seconds
237+
5. Done! Calibration is saved automatically
238+
239+
The built-in tool performs stationarity checks and calibrates both the accelerometer and gyroscope with 100 samples each for optimal accuracy.
240+
241+
### Manual Calibration (Programmatic)
230242

231243
```python
232244
class SettingsActivity(Activity):
@@ -237,7 +249,7 @@ class SettingsActivity(Activity):
237249

238250
# Show instructions
239251
self.status_label.set_text("Place device flat and still...")
240-
time.sleep(2)
252+
wait_for_render() # Let UI update
241253

242254
# Calibrate accelerometer (100 samples)
243255
self.status_label.set_text("Calibrating accelerometer...")
@@ -255,7 +267,7 @@ class SettingsActivity(Activity):
255267

256268
### Persistent Calibration
257269

258-
Calibration data is automatically saved to `data/com.micropythonos.sensors/config.json` and loaded on boot. You only need to calibrate once (unless the device is moved to a different location or orientation changes significantly).
270+
Calibration data is automatically saved to `data/com.micropythonos.settings/sensors.json` and loaded on boot. You only need to calibrate once (unless the device is physically relocated or significantly re-oriented).
259271

260272
## List Available Sensors
261273

@@ -437,6 +449,7 @@ Calibrates the sensor (device must be stationary). Returns calibration offsets.
437449
### Sensor Object
438450

439451
Properties:
452+
440453
- `name` - Human-readable sensor name
441454
- `type` - Sensor type constant
442455
- `vendor` - Manufacturer name

0 commit comments

Comments
 (0)