준호씨의 블로그

MPU-6050 configuration with library 본문

메이커

MPU-6050 configuration with library

준호씨 2018. 5. 21. 16:59
반응형

After I uploaded MPU-6050 soldering and testing movie (https://www.youtube.com/watch?v=iFp8aIoDzwI http://junho85.pe.kr/932)). Someone asked me "how to change the range of the accelerometer and gyroscope to 8g and 500 degrees / sec?"

I didn't know it is configurable before that question. So I searched and found it could be possible.

http://forum.arduino.cc/index.php?topic=151048.msg3565997#msg3565997

But it looks like to use MPU6050 library.

It was not MPU6050_tockn library

MPU6050_tockn is registered at Library Manager. But in 1.2.1, it does not have accelerometer and gyroscope configuration.

https://github.com/tockn/MPU6050_tockn

use MPU6050 library of i2cdevlib

https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/MPU6050.h

If you want to change the range of the accelerometer and gyroscope, write code like below.

accelgyro.setFullScaleAccelRange(MPU6050_ACCEL_FS_8);
accelgyro.setFullScaleGyroRange(MPU6050_GYRO_FS_500);

Warning

I haven't tested yet
반응형
Comments