回復 1#x10532x
不動放在桌上(如果是z軸朝桌面)則會呈現 1g
設定±2g, ±4g, ±8g, and ±16g 四種範圍 只是輸出值不同(依各人喜好) 都是最多1g(Full Scale Range)
比如輸出x軸加速度是ax 除以lab
設定為±2g -----> ax/16384.0
設定為±4g -----> ax/8192.0
設定為±8g -----> ax/4096.0
設定為±16g -----> ax/2048.0
---------------------------------------------------------------------
#define MPU6050_ACCEL_FULL_SCALE 0
Configure the full scale range of accelerometer outputs.
Select the full scale range of accelerometer outputs according to the following table.
AFS_SEL
Full Scale Range
0
+-2 g
1
+-4 g
2
+-8 g
3
+-16 g
returned result is a 16bit signed integer, so if you want to get the gravity (g). the result need to be divided by 65536/full scale range.
for example:
MPU6050_ACCEL_FULL_SCALE set to 2 (+-8 g)
65536/16.0 = 4096.0
the read Accel_X result is 3863
which means the angle velocity is 3863/4096.0 ≒ 0.943 g