そのなのとおり
Fork of MPU6050 by
Diff: MPU6050.cpp
- Revision:
- 2:52305bcb5cda
- Parent:
- 0:662207e34fba
diff -r 662207e34fba -r 52305bcb5cda MPU6050.cpp --- a/MPU6050.cpp Fri Jan 11 00:54:28 2013 +0000 +++ b/MPU6050.cpp Sun Nov 20 05:04:27 2016 +0000 @@ -42,7 +42,7 @@ #include "MPU6050.h" -#define useDebugSerial +//#define useDebugSerial //instead of using pgmspace.h typedef const unsigned char prog_uchar; @@ -52,6 +52,7 @@ /** Default constructor, uses default I2C address. * @see MPU6050_DEFAULT_ADDRESS */ + MPU6050::MPU6050() : debugSerial(USBTX, USBRX) { devAddr = MPU6050_DEFAULT_ADDRESS; @@ -63,11 +64,12 @@ * @see MPU6050_ADDRESS_AD0_LOW * @see MPU6050_ADDRESS_AD0_HIGH */ + /* MPU6050::MPU6050(uint8_t address) : debugSerial(USBTX, USBRX) { devAddr = address; } - +*/ /** Power on and prepare for general usage. * This will activate the device and take it out of sleep mode (which must be done * after start-up). This function also sets both the accelerometer and the gyroscope @@ -83,8 +85,8 @@ #endif setClockSource(MPU6050_CLOCK_PLL_XGYRO); - setFullScaleGyroRange(MPU6050_GYRO_FS_250); - setFullScaleAccelRange(MPU6050_ACCEL_FS_2); + setFullScaleGyroRange(MPU6050_GYRO_FS_500); //+/-250,500,1000,2000 + setFullScaleAccelRange(MPU6050_ACCEL_FS_16); //+/-2,4,8,16 setSleepEnabled(false); // thanks to Jack Elston for pointing this one out! #ifdef useDebugSerial