LSM303 Code

by Xjkh3vk on Sun Mar 24, 2013 12:30 pm

Hi guys, I'm having trouble with my LSM303 accelerometer/magnetometer. I've tried all of the example code from the tutorial, and it doesn't work. I'm not great at coding, could someone please help me? I'm trying to get the x,y,z axis force, and the heading. I would appreciate any suggestions you may have.
Xjkh3vk
 
Posts: 32
Joined: Sun Mar 24, 2013 12:20 pm

Re: LSM303 Code

by adafruit_support_bill on Sun Mar 24, 2013 12:35 pm

Have you tried the accelsensor or magsensor examples from the library? Post the output from the serial monitor.
User avatar
adafruit_support_bill
 
Posts: 28104
Joined: Sat Feb 07, 2009 9:11 am

Re: LSM303 Code

by Xjkh3vk on Sun Mar 24, 2013 1:18 pm

Ah that worked, thanks. I hadn't imported the library properly so I couldn't access the examples. Thanks.
Xjkh3vk
 
Posts: 32
Joined: Sun Mar 24, 2013 12:20 pm