Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MPU6050 Grove_temperature
Gyroscope.h
00001 #ifndef SGAM_MDW_SENSOR_GYROSCOPE_H 00002 #define SGAM_MDW_SENSOR_GYROSCOPE_H 00003 00004 #include "sgam_mdw.h" 00005 #include "mbed.h" 00006 #include "MPU6050.h" 00007 00008 class GyroscopeData { 00009 public: 00010 int16_t ax, ay, az; 00011 int16_t gx, gy, gz; 00012 00013 GyroscopeData(){} 00014 ~GyroscopeData(){} 00015 }; 00016 00017 class Gyroscope: public Sensor<GyroscopeData> { 00018 public: 00019 Gyroscope(I2C &i2c); 00020 virtual ~Gyroscope(); 00021 00022 virtual int initialize(); 00023 virtual int finalize(); 00024 00025 virtual GyroscopeData* getValue(); 00026 virtual const char* getName(); 00027 00028 private: 00029 MPU6050 mpu; 00030 void getMotion(GyroscopeData* data); 00031 }; 00032 00033 #endif // SGAM_MDW_SENSOR_GYROSCOPE_H
Generated on Fri Jul 15 2022 01:20:41 by
1.7.2