Lost + Found QMC5883L 3-Axis Magnetometer driver library for Raspberry Pi Pico C SDK
- C 80.3%
- Python 12.5%
- CMake 7.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| include | ||
| src | ||
| CMakeLists.txt | ||
| conanfile.py | ||
| README.md | ||
lf-qmc5883l
Lost + Found QMC5883L 3-Axis Magnetometer driver library for Raspberry Pi Pico C SDK.
🔌 Hardware Setup
Standard Pin Mapping:
- SDA: GP4 (Pico Pin 6)
- SCL: GP5 (Pico Pin 7)
- Bus: I2C0
📦 Usage
Add this package to your conanfile.txt or CMake setup.
CMake Integration
target_link_libraries(your_project PUBLIC lf-qmc5883l)
Driver Instantiation
#include "lf_qmc5883l.h"
lf_qmc5883l_t qmc;
// Initialize
if (lf_qmc5883l_init(&qmc, i2c0, LF_QMC5883L_DEFAULT_I2C_ADDR)) {
// Successfully initialized!
}
// Read telemetry
float mx, my, mz;
if (lf_qmc5883l_read_data(&qmc, &mx, &my, &mz)) {
printf("Magnetic Field: X=%.2f, Y=%.2f, Z=%.2f uT\n", mx, my, mz);
}