Implemented first Hangar-Service
Dependencies: CalibrateMagneto QuaternionMath
Fork of SML2 by
Accelerometer.h@7:604a8369b801, 2015-02-17 (annotated)
- Committer:
- pvaibhav
- Date:
- Tue Feb 17 16:53:50 2015 +0000
- Revision:
- 7:604a8369b801
- Parent:
- 5:b9f2f62a8f90
- Child:
- 8:cba37530d480
Changed reading method for sensors to avoid high spikes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pvaibhav | 1:c279bc3af90c | 1 | #ifndef _H_ACCELEROMETER_H |
pvaibhav | 1:c279bc3af90c | 2 | #define _H_ACCELEROMETER_H |
pvaibhav | 1:c279bc3af90c | 3 | |
pvaibhav | 1:c279bc3af90c | 4 | #include "I2CPeripheral.h" |
pvaibhav | 7:604a8369b801 | 5 | #include "Sensor.h" |
pvaibhav | 5:b9f2f62a8f90 | 6 | |
pvaibhav | 7:604a8369b801 | 7 | class Accelerometer : public I2CPeripheral, public Sensor |
pvaibhav | 7:604a8369b801 | 8 | { |
pvaibhav | 1:c279bc3af90c | 9 | public: |
pvaibhav | 1:c279bc3af90c | 10 | Accelerometer(I2C &i2c); |
pvaibhav | 7:604a8369b801 | 11 | |
pvaibhav | 7:604a8369b801 | 12 | virtual bool powerOn(); |
pvaibhav | 7:604a8369b801 | 13 | virtual void powerOff(); |
pvaibhav | 7:604a8369b801 | 14 | virtual void start(); |
pvaibhav | 7:604a8369b801 | 15 | virtual void stop(); |
pvaibhav | 7:604a8369b801 | 16 | |
pvaibhav | 7:604a8369b801 | 17 | virtual Sensor::Data read(); |
pvaibhav | 7:604a8369b801 | 18 | |
pvaibhav | 7:604a8369b801 | 19 | private: |
pvaibhav | 7:604a8369b801 | 20 | Timer timer; |
pvaibhav | 1:c279bc3af90c | 21 | }; |
pvaibhav | 1:c279bc3af90c | 22 | |
pvaibhav | 1:c279bc3af90c | 23 | #endif |