A quadcopter control Software (Still in development). achieved single axis stability!!!!! released for others benefit. if you'd like to help co-develop this code, then please let me know
Dependencies: MovingAverageFilter MyI2C PID RC mbed-rtos mbed
Currently on hold, due to the fact that i don't own a RX/TX system
BMP085/BMP085.h@1:e08a4f517989, 2013-08-27 (annotated)
- Committer:
- KarimAzzouz
- Date:
- Tue Aug 27 09:38:49 2013 +0000
- Revision:
- 1:e08a4f517989
initial commit, achieved single axis stability
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
KarimAzzouz | 1:e08a4f517989 | 1 | #ifndef BMP085_H |
KarimAzzouz | 1:e08a4f517989 | 2 | #define BMP085_H |
KarimAzzouz | 1:e08a4f517989 | 3 | |
KarimAzzouz | 1:e08a4f517989 | 4 | #include "Std_Types.h" |
KarimAzzouz | 1:e08a4f517989 | 5 | #include "MyI2C.h" |
KarimAzzouz | 1:e08a4f517989 | 6 | |
KarimAzzouz | 1:e08a4f517989 | 7 | #define BMP_ADDRESS 0x77 |
KarimAzzouz | 1:e08a4f517989 | 8 | #define OSS 3 |
KarimAzzouz | 1:e08a4f517989 | 9 | |
KarimAzzouz | 1:e08a4f517989 | 10 | extern MyI2C I2C0; |
KarimAzzouz | 1:e08a4f517989 | 11 | |
KarimAzzouz | 1:e08a4f517989 | 12 | class BMP085{ |
KarimAzzouz | 1:e08a4f517989 | 13 | |
KarimAzzouz | 1:e08a4f517989 | 14 | public: |
KarimAzzouz | 1:e08a4f517989 | 15 | BMP085(); |
KarimAzzouz | 1:e08a4f517989 | 16 | void Calibrate(void); |
KarimAzzouz | 1:e08a4f517989 | 17 | void readUT_Flag(void); |
KarimAzzouz | 1:e08a4f517989 | 18 | void readUP_Flag(void); |
KarimAzzouz | 1:e08a4f517989 | 19 | uint16 readUT(void); |
KarimAzzouz | 1:e08a4f517989 | 20 | uint32 readUP(void); |
KarimAzzouz | 1:e08a4f517989 | 21 | int16 read_Temperature(void); |
KarimAzzouz | 1:e08a4f517989 | 22 | int32 read_Pressure(void); |
KarimAzzouz | 1:e08a4f517989 | 23 | private: |
KarimAzzouz | 1:e08a4f517989 | 24 | |
KarimAzzouz | 1:e08a4f517989 | 25 | int16 AC1,AC2,AC3,AC4,AC5,AC6; |
KarimAzzouz | 1:e08a4f517989 | 26 | int16 B1,B2; |
KarimAzzouz | 1:e08a4f517989 | 27 | int16 MB,MC,MD; |
KarimAzzouz | 1:e08a4f517989 | 28 | int32 B5; |
KarimAzzouz | 1:e08a4f517989 | 29 | |
KarimAzzouz | 1:e08a4f517989 | 30 | void write(char reg,char data); |
KarimAzzouz | 1:e08a4f517989 | 31 | |
KarimAzzouz | 1:e08a4f517989 | 32 | int16 read (char reg); |
KarimAzzouz | 1:e08a4f517989 | 33 | |
KarimAzzouz | 1:e08a4f517989 | 34 | uint8 readInt (char reg); |
KarimAzzouz | 1:e08a4f517989 | 35 | |
KarimAzzouz | 1:e08a4f517989 | 36 | }; |
KarimAzzouz | 1:e08a4f517989 | 37 | #endif |