Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 7 months ago.
LSM303D accelerometer attempt to read
Hello, I have a LSM303D 3D accelerometer and 3D magnetometer. It is a I2C slave.
I am trying to get familiar with it, so I tried to read the z axis acceleration.
I wrote the script attached (reading.cpp) and put it in my Nucleo board. /media/uploads/Satanello/reading.cpp
Unfortunately the terminal reads:
data is: 0.
What wrong did I do?
Thanks!