This commit is contained in:
2016-09-10 22:33:51 +02:00
parent d20de85ee3
commit 9e78615f9f
2 changed files with 2 additions and 11 deletions

View File

@@ -9,7 +9,7 @@ This library depends on the wiringPi library. Make sure to install it first (`su
4. have fun :)
## Including the library
After you have compiled and copied the library properly just include it (`#include <libgy521.h>`) and compile with the flag `lgy521`.
After you have compiled and copied the library properly just include it (`#include <libgy521.h>`) and compile with the flag `-lgy521`.
## Documentation
[MPU-6050 Datasheet](https://www.olimex.com/Products/Modules/Sensors/MOD-MPU6050/resources/RM-MPU-60xxA_rev_4.pdf)

View File

@@ -1,4 +1,3 @@
//#include <wiringPi.h>
#include <wiringPiI2C.h>
#include <math.h>
#include <stdio.h>
@@ -6,9 +5,7 @@
#include "libgy521.h"
//Constants
#define MPU6050_I2C_ADDRESS 0x68 //I2C
#define MPU6050_I2C_ADDRESS 0x68 //I2C
#define GRAVITIY_MS2 9.80665
// Scale Modifiers
@@ -96,12 +93,6 @@ int read_i2c_word_combined(int reg) {
}
}
float getTemp(void) {
/**
* Formula given in