Sign up ×
Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. It's 100% free, no registration required.

I am trying to connet a tri axis accelerometer LSM303DLH to arduino UNO using the libraries taken from the following links (https://github.com/adafruit/Adafruit_LSM303DLHC and/or https://github.com/ryantm/LSM303DLH) but none of them work. Using the following connection: SCL on A5, SDA on A4, Vin on 5V, Gng on Gnd.

I should be able to see the values of the accelerometer but the serial monitor is empty.

I've tried inserting a few print in the libraries to understand where the execution stops, basically after a Wire.endTrasmission() the program doesn't go forward. How can I connect the accelerometer using I2C?

share|improve this question
    
Please post the code – UserK Mar 6 at 16:54

1 Answer 1

Are you using one module bought from Adafruit?

Make sure the connection is correct between the sensor and Arduino, then make sure that the script doesn’t get stuck when the Wire is begun.

Another thing that you need to make sure, is to have the correct address, it depends from board and each one can have a different one or a selector.

This can be helpful to figure out what the wiring is

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.