10-31-2012 08:36 AM
hi, i'm Vincenzo, an electronic engineering. I'm realizing a work about LSM303, accelerometer and magnetometer, I've to work with Arduino and Labview: can someone help me with the implementation of the .vi to read acceleration data and magnetic field data into two graphs?
Thank you for the answers.
Regards
11-02-2012 03:17 AM
Hi Vincenzo,
I can send you a typical example to read an analog input from Arduino with Labview through "NI Labview Interface for Arduino Toolkit". Starting from this example you'll can modify it for your purpose. Have a good time!
Enzo
AE Senior
11-02-2012 02:15 PM
Thank you so much. I'll try to learn how to use these two powerful instruments, Arduino and Labview.
I wish I can ask something else if I'll need it!
Best regards.
10-26-2013 01:33 PM
Hi! Working and studying various documentation about this sensor, I've found a sketch for Arduino. I've a question: why getLSM303_accel and getLSM303_mag functions are realized in two different ways? I would understant to be able to interpretate this code. These are the function:
void getLSM303_mag(int * rawValues)
{
Wire.beginTransmission(LSM303_MAG);
Wire.write(OUT_X_H_M);
Wire.endTransmission();
Wire.requestFrom(LSM303_MAG, 6);
for (int i=0; i<3; i++)
rawValues[i] = (Wire.read() << 8 ) | Wire.read();
}
void getLSM303_accel(int * rawValues)
{
rawValues[Z] = ((int)LSM303_read(OUT_X_L_A) << 8 ) | (LSM303_read(OUT_X_H_A));
rawValues[X] = ((int)LSM303_read(OUT_Y_L_A) << 8 ) | (LSM303_read(OUT_Y_H_A));
rawValues[Y] = ((int)LSM303_read(OUT_Z_L_A) << 8 ) | (LSM303_read(OUT_Z_H_A));
I thought to realize in egual ways these void.
Thanks, regards
10-26-2013 02:44 PM