-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readRawAccel - Doesnt provide raw data #7
Comments
Hi rishikanths, |
Thanks for the help. I was able to use DIY calibration sketch. However, I had to break it into three due to space constraints. I wrote a small sketch to compare outputs using your library and standard "Adafruit_LSM9DS1.h". The following is the output (first three values are using
As shown, the values using your library (first three) differ by a factor of 10 when compared to standard library. Am I missing something in the sketch? |
The reason is that Adafruit gives the acceleration in m/s2 and readRawAccel in g (gravity). |
I saw some comments in the mail about the program not waiting for keyboard input, but I don't see it here. I guess you solved it? By the way I like the fact that you are using a UNO and a separate LSM9DS1. I attached a shortened version that should run on an UNO |
Not sure if this is expected or unexpected Testing all library chip settings FunetODR sample rate result Full Scale settings should hardly inluence measured values deg/s Gyro raw dps dps dps µT Magnet µT µT µT Test Operational Mode 0=off, 1 accelerometer only, 2= Accel + Gyro Default operational mode 2 setGyroODR result (shared ODR, i>0 overrules the Accel setting) setAccelODR result (shared ODR, i=0 switches off Gyro and Accel) Switch off Gyro (Accelerometer only mode) setMagnetODR sample rate result |
Thx for your trouble and no this is definitely not what I expected. Can I ask for your help again? Attached the revised test program which I think will run. I did not have time yet to split the calibration program in three. |
Sorry for the delayed response Testing all library chip settings Full Scale settings should hardly inluence measured values setAccelFS(0) Setting 2.00 g Accel uncalibrated -0.04g 0.01g 1.01g Gyro Calibration @fs 500 dps setMagnetFS(0) Setting 400.00 µT Magnet 9.25µT 23.77µT -37.68µT setGyroODR result (shared ODR, i>0 overrules the Accel setting) setAccelODR result (shared ODR, i=0 switches off Gyro and Accel) Switch off Gyro (Accelerometer only mode) setMagnetODR sample rate result Changing output units readAccel -0.36m/s2 0.05m/s2 9.74m/s2 |
Thx for your trouble. I found a way to reduce the memory usage by a very large factor. It turns out that the UNO compiler copies all the Serial.prints to RAM. By means of encapsulating the text in the F( ) macro it prints directly from flash. |
Hi Rishikanths Let me know how it runs on your system now. Do you have some information for me what you used for testing. What did you use for the LSM9DS1 chip, and how did you connect it to the Uno board? Regards Femme |
Hi,
When I try to access the raw data using the following command,
IMU.readRawAccel(gx,gy,gz);
and calibrated data using
IMU.readAccel(x,y,z);
However, both the data values are the same?
The text was updated successfully, but these errors were encountered: