UM7 accelerometer sensor data

hello friends. I can read roll pitch yaw values with this arduino code.

But I need to read accelerometer X,Y,Z sensor data. How can I modify this code ?


I enabled raw x,rawy,and rawz accel. data with CHRR serial interface.

Have you tried to read the relevant data packets, as described in the UM7 data sheet?
Post the code.

Yes but I am not good at programming.

Arduino is for learning! Spend some time figuring out how to accomplish what you want, and you will be a better person for it.

I changed data packets in code like this:


I can read Accelerometer datas. But values like that :

X = -166
Y = 183
Z = 4230
X = -161
Y = 191
Z = 4204
X = -153
Y = 195
Z = 4233
X = -158
Y = 212
Z = 4216
X = -158
Y = 204
Z = 4227
X = -148
Y = 191
Z = 4194
X = -171
Y = 205
Z = 4211
X = -159
Y = 201
Z = 4224
X = -153
Y = 189
Z = 4225
X = -165
Y = 212
Z = 4214

How can I convert to g(m/sn2) data these values ?

The data sheet explains how to convert units.

However, if you hold the sensor still with any axis straight up or down, the acceleration on that axis is 9.8 m/s2.

I couldnt find converting formule in datasheet can you show me ??

Here is an overview of accelerometer calibration: Programming and Calibration | ADXL345 Digital Accelerometer | Adafruit Learning System

It is for a different accelerometer, but the principles are the same.