LSM303DLH Problem

I am unable to read the magnetometer values using my arduino. I am using the library and sample serial sketch provided. The accelerometer seems to be working fine, I am able to read it’s values and turn it on and off by writing to CTRL_REG1_A. However, the values for the magnetometer all stay at a constant 32.00 and never change. Do I have a bad chip or am I missing something?

Hello,

I am sorry you are having trouble with your LSM303DLH. Did you ever get any good readings from the magnetometer, or has it always returned 32.00?

- Kevin

No, it never worked correctly. I received it yesterday, just tried it out today.

Hello,

It sounds like the unit might be bad. Please contact us directly with your order number.

- Kevin

Got the replacement board today. I am now getting all six readings; X, Y, and Z from both the accelerometer and magnetometer.

Thanks. :smiley:

As an update to anyone else who might be having a similar issue: a customer, Derek, reported that he was having the same problem of always reading 32 from the magnetometer. However, he was able to solve the problem by changing how he applied power to the LSM303DLH. Here is what Derek wrote in an email to us, posted with his permission:

- Kevin