HDC1080 sensor library
HDC1080.h@1:a0e46d956969, 2019-11-08 (annotated)
- Committer:
- MACRUM
- Date:
- Fri Nov 08 04:56:00 2019 +0000
- Revision:
- 1:a0e46d956969
- Parent:
- 0:fdb750cc9ca8
- Child:
- 4:250aceaa7a01
Remove printf
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shivanandgowdakr | 0:fdb750cc9ca8 | 1 | |
shivanandgowdakr | 0:fdb750cc9ca8 | 2 | #ifndef HDC1080_H |
shivanandgowdakr | 0:fdb750cc9ca8 | 3 | #define HDC1080_H |
shivanandgowdakr | 0:fdb750cc9ca8 | 4 | |
shivanandgowdakr | 0:fdb750cc9ca8 | 5 | |
shivanandgowdakr | 0:fdb750cc9ca8 | 6 | class HDC1080:public I2C { |
shivanandgowdakr | 0:fdb750cc9ca8 | 7 | public: |
shivanandgowdakr | 0:fdb750cc9ca8 | 8 | |
MACRUM | 1:a0e46d956969 | 9 | HDC1080( PinName sda, PinName slc) ; // constructor |
shivanandgowdakr | 0:fdb750cc9ca8 | 10 | |
shivanandgowdakr | 0:fdb750cc9ca8 | 11 | int ReadSignature(void); |
shivanandgowdakr | 0:fdb750cc9ca8 | 12 | float readTemperature( void); // to read the Temperature from HDC1080 |
shivanandgowdakr | 0:fdb750cc9ca8 | 13 | float readHumidity(void); // to read the Humidity from HDC1080 |
MACRUM | 1:a0e46d956969 | 14 | unsigned long readSerialNumber(void); // to read the Humidity from HDC1080 |
shivanandgowdakr | 0:fdb750cc9ca8 | 15 | |
shivanandgowdakr | 0:fdb750cc9ca8 | 16 | protected: |
shivanandgowdakr | 0:fdb750cc9ca8 | 17 | uint16_t read2Bytes(int chip_addr, int offset); |
MACRUM | 1:a0e46d956969 | 18 | char _buffer[5]; |
MACRUM | 1:a0e46d956969 | 19 | |
shivanandgowdakr | 0:fdb750cc9ca8 | 20 | }; |
shivanandgowdakr | 0:fdb750cc9ca8 | 21 | |
shivanandgowdakr | 0:fdb750cc9ca8 | 22 | #endif |