|
@@ -5,7 +5,6 @@ |
|
|
#include <wiringPiI2C.h> |
|
|
#include <wiringPiI2C.h> |
|
|
|
|
|
|
|
|
//Preset information about MPU3050 (gyro sensor) |
|
|
//Preset information about MPU3050 (gyro sensor) |
|
|
#define MPU3050_PWR (0x6b) |
|
|
|
|
|
#define MPU3050_I2C (0x69) |
|
|
#define MPU3050_I2C (0x69) |
|
|
#define MPU3050_REG (0x21) |
|
|
#define MPU3050_REG (0x21) |
|
|
|
|
|
|
|
@@ -80,9 +79,6 @@ int main() |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//Power I2C and begin tracking |
|
|
|
|
|
wiringPiI2CWriteReg8(i2cSetup, MPU3050_PWR, 0x01); |
|
|
|
|
|
|
|
|
|
|
|
//Declare 'gyroInput' to be used to contain the input from gyro sensor later |
|
|
//Declare 'gyroInput' to be used to contain the input from gyro sensor later |
|
|
int gyroInput; |
|
|
int gyroInput; |
|
|
//Initialize 'count' to be used to keep track how many consecutive 0.1 secs had the gyro sensor stayed at 0 |
|
|
//Initialize 'count' to be used to keep track how many consecutive 0.1 secs had the gyro sensor stayed at 0 |
|
|