20948 9DoF using SPI - need help getting acc y etc values

I have this Qwiic breakout board and would like to get scaled accelerometer x, y, z values to perform some basic math on. The board is connected to a UNO by SPI. I am new to arduino so am struggling to figure this out from the examples. How do I get scaled acc y? Is there a variable list? Not looking for pages of code, just the basics. Thanks in advance for any help.

If you have the raw sensor values, then while held still, a strictly vertical accelerometer axis reports +/- 1 g, regardless of the range selected. Use the reported value as the scale factor to scale to g units.

An additional multiplicative factor of 9.8 scales the data to m/s^2.

Thank you.

I was able to muddle through studying the KEYWORDS.TXT and the below object etc:

myICM.getAGMT();

myICM.accX();

myICM.gyrX();

etc.

My next question regards calibration. I am getting accX values of around 50milli G’s sitting still. One of the examples used a SCALED variable but I could not figure out how that worked. How do you calibrate this sensor?

Thanks in advance

John

An excellent general tutorial and overview of accelerometer and magnetometer calibration can be found at https://thecavepearlproject.org/2015/05 … r-arduino/

For the accelerometer, the simple axial min/max approach works well:

https://learn.adafruit.com/adxl345-digi … rogramming

https://chionophilous.wordpress.com/201 … e-methods/

Thank you. That second article was an excellent read.

I am getting accZ values between 995 and 1035. Should I be calibrating this to exactly 1000?

John

It is reasonable to use a scale factor that leads to a value of 1000 milli-g, when averaging many individual measurements.

Ok, new question. I want to use the RTC to timestamp the file I am writing to the SD card.

I cannot get any of the Example RTC sketches to work. They all report “Couldn’t find RTC”. As I understand it the RTC time is set once the GPS gets its first fix [and the battery is present]. That happened several times already. I don’t want the “live” GPS time [in case I don’t have a fix] but rather the RTC time.

Another problem is I cannot find any documentation one what clock chip is on this “Ultimate GPS Data Logger” shield. Therefore I have to blindly try every example.

Thanks

John

I’m not seeing any RTC chip on adafruits shield, you’re going to have to either add your own external RTC or just pull time from the GPS. (Assuming the GPS has a clear view of the sky or enough reception to return current time. )