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.
BMP180Wrapper.h@1:02f543f15108, 2020-05-26 (annotated)
- Committer:
- marcel1691
- Date:
- Tue May 26 17:33:13 2020 +0000
- Revision:
- 1:02f543f15108
- Child:
- 2:e28e685938f1
Wrapper fuer Einsatz als HTS221
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| marcel1691 | 1:02f543f15108 | 1 | /** |
| marcel1691 | 1:02f543f15108 | 2 | * Bosch BMP180 Digital Pressure Sensor |
| marcel1691 | 1:02f543f15108 | 3 | * |
| marcel1691 | 1:02f543f15108 | 4 | */ |
| marcel1691 | 1:02f543f15108 | 5 | |
| marcel1691 | 1:02f543f15108 | 6 | #ifndef BPM180_BMP180WRAPPER_H_ |
| marcel1691 | 1:02f543f15108 | 7 | #define BPM180_BMP180WRAPPER_H_ |
| marcel1691 | 1:02f543f15108 | 8 | |
| marcel1691 | 1:02f543f15108 | 9 | #include <BMP180.h> |
| marcel1691 | 1:02f543f15108 | 10 | #include "mbed.h" |
| marcel1691 | 1:02f543f15108 | 11 | #include "DevI2C.h" |
| marcel1691 | 1:02f543f15108 | 12 | |
| marcel1691 | 1:02f543f15108 | 13 | class BMP180Wrapper |
| marcel1691 | 1:02f543f15108 | 14 | { |
| marcel1691 | 1:02f543f15108 | 15 | public: |
| marcel1691 | 1:02f543f15108 | 16 | BMP180Wrapper(DevI2C *i2c); |
| marcel1691 | 1:02f543f15108 | 17 | virtual int init(void *init); |
| marcel1691 | 1:02f543f15108 | 18 | virtual int read_id(uint8_t *id); |
| marcel1691 | 1:02f543f15108 | 19 | virtual int get_humidity(float *pfData); |
| marcel1691 | 1:02f543f15108 | 20 | virtual int get_temperature(float *pfData); |
| marcel1691 | 1:02f543f15108 | 21 | int enable(void); |
| marcel1691 | 1:02f543f15108 | 22 | private: |
| marcel1691 | 1:02f543f15108 | 23 | BMP180 bmp180; |
| marcel1691 | 1:02f543f15108 | 24 | }; |
| marcel1691 | 1:02f543f15108 | 25 | |
| marcel1691 | 1:02f543f15108 | 26 | #endif /* BPM180_BMP180WRAPPER_H_ */ |