This repository contains Arduino, Raspberry Pi (WiringPi), and Linux i2cdev libraries and examples for working with the STMicroelectronics LIS2MDL magnetometer. The class library and examples were adapted from Kris Winer's repository.
To use this library you will also need our cross-platform support library.
We have tested this EM7180 library on the following hardware:
-
Ladybug STM32L4 board from Tlera Corp
-
Teensy 3.2, 3.6
-
Raspberry Pi 3
-
NVIDIA Jetson TX1
RaspberryPi users should download and install WiringPi, then cd to extras/wiringpi, and run make to build the examples. You may have to run the examples as root: sudo ./Basic.
Users of NVIDIA Jetson and other Linux-based boards should install I2C support by running the command:
sudo apt-get install libi2c-dev i2c-tools
You can then can cd to extras/i2cdev, and run make. You may have to run the examples as root: sudo ./Basic.