diff --git a/lib/lis2mdl/README.md b/lib/lis2mdl/README.md index 47c2bf42..adefa275 100644 --- a/lib/lis2mdl/README.md +++ b/lib/lis2mdl/README.md @@ -6,17 +6,17 @@ It provides low-level register access, automatic calibration, heading computatio --- -## ๐Ÿงญ Features - -* โœ… Full **IยฒC driver** for LIS2MDL -* โœ… Supports **10 / 20 / 50 / 100 Hz** output data rates -* โœ… **Temperature-compensated** and **low-power** modes -* โœ… Read **raw**, **scaled**, or **calibrated** magnetic field data -* โœ… **2D and 3D calibration** routines (auto min/max method) -* โœ… **Heading computation** (flat or tilt-compensated) -* โœ… **Compass direction labels** (N, NE, E, โ€ฆ) -* โœ… Built-in **digital low-pass filter** and **offset cancellation** control -* โœ… Diagnostic utilities: +## Features + +* Full **IยฒC driver** for LIS2MDL +* Supports **10 / 20 / 50 / 100 Hz** output data rates +* **Temperature-compensated** and **low-power** modes +* Read **raw**, **scaled**, or **calibrated** magnetic field data +* **2D and 3D calibration** routines (auto min/max method) +* **Heading computation** (flat or tilt-compensated) +* **Compass direction labels** (N, NE, E, โ€ฆ) +* Built-in **digital low-pass filter** and **offset cancellation** control +* Diagnostic utilities: * Register dump * Calibration quality metrics @@ -24,7 +24,7 @@ It provides low-level register access, automatic calibration, heading computatio --- -## โš™๏ธ Hardware Requirements +## Hardware Requirements * **LIS2MDL** 3-axis magnetometer (STMicroelectronics) * **MicroPython/CircuitPython board**, e.g.: @@ -37,7 +37,7 @@ It provides low-level register access, automatic calibration, heading computatio --- -## ๐Ÿ”Œ Wiring Example (ESP32) +## Wiring Example (ESP32) | LIS2MDL Pin | ESP32 Pin | Description | | ----------- | --------- | ------------ | @@ -58,7 +58,7 @@ mag = LIS2MDL(i2c) --- -## ๐Ÿš€ Quick Start +## Quick Start ### Read magnetic field @@ -87,7 +87,7 @@ heading = mag.heading_with_tilt_compensation(read_accel) --- -## โš–๏ธ Calibration +## Calibration Calibration is essential to obtain accurate compass readings. The driver provides **automated routines** for both 2D (flat) and 3D calibration. @@ -124,7 +124,7 @@ mag.calibrate_reset() --- -## ๐Ÿงฐ Configuration Examples +## Configuration Examples ### Output rate and power @@ -154,7 +154,7 @@ mag.set_bdu(True) --- -## ๐Ÿงฎ Heading Filtering +## Heading Filtering You can apply a **smoothing filter** on the heading angle to stabilize the readings: @@ -168,7 +168,7 @@ mag.set_heading_filter(alpha=0.2) # Light smoothing --- -## ๐Ÿ” Diagnostics & Debug +## Diagnostics & Debug ### Read sensor ID @@ -200,7 +200,7 @@ print("Register dump:", regs) --- -## ๐Ÿง  Internal Methods Overview +## Internal Methods Overview | Method | Description | | ---------------------------------- | ------------------------------ | @@ -215,7 +215,7 @@ print("Register dump:", regs) --- -## ๐Ÿงช Example: Continuous Compass Loop +## Example: Continuous Compass Loop ```python from machine import I2C, Pin @@ -234,9 +234,9 @@ while True: --- -## ๐Ÿ“š References +## References * [STMicroelectronics LIS2MDL Datasheet](https://www.st.com/resource/en/datasheet/lis2mdl.pdf) * [MicroPython Documentation](https://docs.micropython.org/en/latest/library/machine.I2C.html) ---- \ No newline at end of file +---