LSM303DLH Accelerometer Not Printing

Hi everyone,

This is my first time posting so if I’m a bit vague or have missed something I’d like to apologize in advance.

Anyways, so I’m using the LSM303DLH 3D Compass and Accelerometer Carrier with Voltage regulators.

I have the accelerometer plugged in, with 5V for VIN, GND for GND, and Analog Pins 5 and 4, respectively, for SCL and SDA. I also have the LSM303 library downloaded and registered with the Arduino, and can upload all of the Example codes.

Today I tried to use the “Serial” example code to test if the accelerometer was communicating the x,y,z outputs for the A and M respectively to the Serial monitor in the Arduino Uno board. No values came up, the Serial print monitor was completely blank.

I checked if the voltage regulators in the accelerometer were working, and if the analog pins 5 and 4 were getting any voltage. All of them were working.

I don’t know why this is happening; I tried using the “Serial” example code yesterday with the exact same setup and all of the values were printing as they were supposed to. Today I do the same thing and nothing comes up.

Any help would be appreciated

EDIT: I also wrote a general Serial print code for the Arduino to see if something was wrong with the Serial monitor. That worked, so there isn’t anything wrong with that at least.

Hi.

I am sorry to hear you are having trouble with your LSM303DLH communication. It sounds like you have a intermittent connection. Can you review your solder connections? Also, how are you powering your system? If you are using batteries, are they fully charged? If you post a picture of your setup, we might be able to notice something.

- Ryan

Ryan,

You were right, it was the solder joints. I re-soldered them, and the accelerometer worked.

Thank you for your help, and especially for a quick response.

You are very welcome. I am glad you got it working, and thank you for letting us know how you fixed your problem.

- Ryan