LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LIFA program with LSM303DLHC imu

Solved!
Go to solution

Hi,

I am trying to run the program posted in documents for the LSM303DLM imu, but for use with a LSM303DLHC accelerometer.  Specifically the read axes VI as shown in the attachments, also I have the LIFA base program running on the Arduino.  I always get a timeout error from not communiticating with the Arduino.  I've changed address and register parameters to no avail.  Has anyone successfully used this VI or any other VI with a LSM303DLHC to get accelerometer data?

Thanks.

Download All
0 Kudos
Message 1 of 7
(5,453 Views)

Sorry for not getting back to you sooner.  Pololu claims that the code needs to be changed to work with the LSM303DLHC.  I've gone through and changed the slave address and the registers for the accelerometer and magnetometer but I don't see anything major that would make my other library not work if you use 0011001 as the slave address.

I think that maybe the initialization is not correct for the DLHC version.  What I always do is find Arduino code that works and then base configuration off of that and is what I suggest you do.  This will tell you if it's an issue with the sensor or if it's an issue with the configuration.

If you find working Arduino code (that you have personally tested), please attach that code here.  If the configuration is different then modify the Accel Init.vi accordingly (in this new library attached) then let me know the results.

0 Kudos
Message 2 of 7
(3,799 Views)

Nathan,

Attached is code from the Pololu website that works when running on the Arduino.  I have played around with configuration settings in the LabVIEW code to no avail at this point.  Thanks for looking into this though.

0 Kudos
Message 3 of 7
(3,800 Views)
Solution
Accepted by topic author TreyONan

What did you try with my latest version?  The Init sequence in the code that you posted is different from mine.  Could you post the VI that modified and tried?

0 Kudos
Message 4 of 7
(3,800 Views)

I apologize, I wasn't running the correct VI.  I ran the graph data VI and now I am getting measurements.  The Z accelerometer data is offset to positive 1200 for some reason.  I will investigate further or just correct with a negative offset.  Do you plan on expanding this library with calibration VI, etc....

Thanks.

0 Kudos
Message 5 of 7
(3,800 Views)

Trey1234 wrote:

The Z accelerometer data is offset to positive 1200 for some reason.

I don't really know what that means without more information.  When is it offset 1200?  What is the orientation of the sensor when this happens (relative to gravity).

I don't currently have any active plans to add anything at the moment.  If there is already code that does this, it can probably easily be ported to LabVIEW/LIFA.

0 Kudos
Message 6 of 7
(3,800 Views)

It follows the orientation of the sensor to gravity.  After reading the datasheet, there is always an acceleration due to gravity.

0 Kudos
Message 7 of 7
(3,800 Views)