The LSM303D combines a digital 3-axis accelerometer and 3-axis magnetometer into a single package that is ideal for making a tilt-compensated compass. The six independent readings, whose sensitivities can be set in the ranges of ±2 to ±16 g and ±2 to ±12 gauss, are available through I²C and SPI interfaces. This LSM303 carrier board includes a 3.3 V voltage regulator and integrated level shifters that allows operation from 2.5 to 5.5 V, and the 0.1″ pin spacing makes it easy to use with standard solderless breadboards and 0.1″ perfboards.
Compare all products in Accelerometers, Gyros, & Compasses.
- LSM303 Arduino library
- This is a library for the Arduino that interfaces with our LSM303D, LSM303DLHC, and LSM303DLM 3D compass and accelerometer carriers as well as the compass and accelerometer ICs on the MinIMU-9 v3 and AltIMU-10 v3 (it also works with older versions of those boards, some of which used the LSM303DLH and LSM303DLHC). It makes it simple to configure the device and read the raw accelerometer and magnetometer data, and it has a function for computing the tilt-compensated heading for those looking to use the LSM303 as a tilt-compensated compass.
- Quick and Dirty Compass Calibration in 3d
- A Bot-thoughts.com blog post about calibrating the LSM303DLH’s magenetometer and visualizing magnetic distortions. The post can generally be applied to the very similar LSM303DLM and LSM303DLHC as well.
- ascii_graph by drewtm
- This sketch outputs a text-based graph of LSM303 accelerometer and L3G gyro data, providing a quick way to check whether the sensors are working as expected.