Cleanup
This commit is contained in:
@@ -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)
|
||||
|
11
libgy521.c
11
libgy521.c
@@ -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
|
||||
|
Reference in New Issue
Block a user