examples for LSM303


Are there any examples for this sensor with arduino ? http://www.sparkfun.com/products/9810 if there aren't could some one point me in the right direction or post some example code.

Thanks Regards


Did you look at the comments on that page? First one is a link to a library for the Arduino.

I received mine today from Sparkfun - with the breakout. Havent been able to do anything with it at all. Tried the new library but to no avail. Does anyone have a small sample program that work with Uno and LSM303DLH?

Or, can anyone else with a LSM303DLH try the new library with their suggested pin-outs and see if it works. That would at least help me figure out if mine is bad or not.

Hi, I’m using the LSM303DLH.
I implemented the I2C comunication, the compensatio of the compass with the accelerometer data, and the accelerometer calibration (using the AN3192 of ST).
Now, I’m calibraiting the compass (method of the least square fitting ellipsoid AN3192) but I having big problems…
Anyone can help me???

Exuse me, now I'm calibraiting the MAGNETIC SENSOR, not the compass...

Works fine for me. Make sure you are using ANALOG pins, not the DIGITAL ones.

) but I having big problems…

Well, I’m sure we are all really sorry to hear that, but until you open up to us, and tell us what those problems are, we won’t be able to help you.
(It’s a bit like AA in that respect)

Hi I Can confirm that using the sparkfun level converter works with the LSM303DLH on a Arduino Uno and stuff