Even if clouds obscure your view of the night sky, you’ll know which way is north, as long as you have our new click – LSM303AGR click.
LSM303AGR click measures acceleration and magnetic field characteristics. It carries the LSM303AGR 3D accelerometer and 3D magnetometer. LSM303AGR click is designed to run on a 3.3V power supply. It communicates with the target microcontroller over I2C interface.
The sensor has linear acceleration full scales of ±2g/±4g/±8g/±16g and a magnetic field dynamic range of ±50 gauss.
Visit the GitHub library for Hexiwear, to see the code example for initializing the sensor and reading the values.
Magnetic field measurement
A magnetic field is defined both by strength and direction. The strength of it is measured in the units of tesla (in honor of Nikola Tesla). Earth’s magnetic field ranges between 25,000 and 65,000 nT. If you think that this is a lot, you should know that a common refrigerator magnet has the strength of 10,000,000 nT.
For more information about the click, see the product page.