Pages: [1]   Go Down
Author Topic: interfacing LSM303DLH  (Read 1199 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I am a newbie, this is my first post. I am working on a Arduino Uno with a Pololu LSM303DLH 3D Compass and accelerometer; in order to read the sensor I use this library https://github.com/ryantm/LSM303DLH but it returns raw data.
How can I convert accelerometer raw data into mg (or g) ?

Thanks,
Daddym85
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13742
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


have you checked the datasheet - http://www.pololu.com/file/download/LSM303DLH.pdf?file_id=0J433 - ?

it states that depening on some flags the full scale is either 2,4 or 8 G. So you need to map the raw values 0..n  to 0..4 for example.
 

Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: