lib para o framework sgam
Dependencies: MPU6050 Grove_temperature
Dependents: example_smart-grid
peripheral/impl/Gyroscope.h
- Committer:
- AndersonIctus
- Date:
- 2019-06-03
- Revision:
- 4:f21aab30658a
- Parent:
- 3:f998244e9f80
- Child:
- 5:caecc2426bbb
File content as of revision 4:f21aab30658a:
#ifndef SGAM_GYROSCOPE_H #define SGAM_GYROSCOPE_H #include "mbed.h" #include "Sensor.h" #include "MPU6050.h" typedef struct { int16_t ax, ay, az; int16_t gx, gy, gz; } GyroscopeData; class Gyroscope: public Sensor<GyroscopeData> { public: Gyroscope(I2C i2c); virtual ~Gyroscope(); virtual GyroscopeData getValue(); virtual void setCallbackReadOcurred( void* (*callback)(GyroscopeData* value) ); protected: virtual void run(float timeout); virtual void acceptDataEvent(GyroscopeData* data); private: MPU6050 mpu; void getMotion(GyroscopeData* data); }; #endif // SGAM_GYROSCOPE_H