MPU6050.h 732 B

123456789101112131415161718192021222324252627282930
  1. #ifndef MPU6050_h
  2. #define MPU6050_h
  3. #include "Arduino.h"
  4. #include <Wire.h>
  5. class MPU6050 {
  6. public:
  7. MPU6050(void);
  8. long accelX, accelY, accelZ;
  9. float beschleunigungX, beschleunigungY, beschleunigungZ;
  10. float gyroX, gyroY, gyroZ;
  11. void getAngularVelocity(void);
  12. void calculateAngle(void);
  13. void printData(void);
  14. void setUpMPU();
  15. void callibrateGyroValues(void);
  16. void readAndProcessAccelData(void);
  17. void processAccelData(void);
  18. void readAndProcessGyroData(void);
  19. void getGyroValues(void);
  20. long gyroXCalli, gyroYCalli, gyroZCalli,gyroXPresent,gyroYPresent,gyroZPresent,gyroXPast,gyroYPast,gyroZPast,timePast,timePresent;
  21. float winkelX,winkelY,winkelZ;
  22. };
  23. #endif