Dependencies: ChaNFSSD mbed BMP085 SHT2x
AD7994.h@1:83960ee4d9a2, 2012-01-13 (annotated)
- Committer:
- tosihisa
- Date:
- Fri Jan 13 10:15:08 2012 +0000
- Revision:
- 1:83960ee4d9a2
- Parent:
- 0:6089ae824f06
add 5-sec wait before using CO2-sensor
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tosihisa | 1:83960ee4d9a2 | 1 | /* |
tosihisa | 1:83960ee4d9a2 | 2 | * Copyright (c) 2011 Toshihisa T |
tosihisa | 1:83960ee4d9a2 | 3 | * Released under the MIT License: http://mbed.org/license/mit |
tosihisa | 1:83960ee4d9a2 | 4 | */ |
tosihisa | 0:6089ae824f06 | 5 | |
tosihisa | 0:6089ae824f06 | 6 | #ifndef __AD7994_H /* } */ |
tosihisa | 0:6089ae824f06 | 7 | |
tosihisa | 0:6089ae824f06 | 8 | #include "mbed.h" |
tosihisa | 0:6089ae824f06 | 9 | |
tosihisa | 0:6089ae824f06 | 10 | class AD7994 : public Base { |
tosihisa | 0:6089ae824f06 | 11 | |
tosihisa | 0:6089ae824f06 | 12 | public: |
tosihisa | 0:6089ae824f06 | 13 | AD7994(PinName p_sda, PinName p_scl); |
tosihisa | 0:6089ae824f06 | 14 | void Start(); |
tosihisa | 0:6089ae824f06 | 15 | unsigned short getVal(); |
tosihisa | 0:6089ae824f06 | 16 | void update(); |
tosihisa | 0:6089ae824f06 | 17 | unsigned short readChn(int chnNo); |
tosihisa | 0:6089ae824f06 | 18 | |
tosihisa | 0:6089ae824f06 | 19 | protected: |
tosihisa | 0:6089ae824f06 | 20 | I2C i2c; |
tosihisa | 0:6089ae824f06 | 21 | unsigned short ch_val[4]; |
tosihisa | 0:6089ae824f06 | 22 | }; |
tosihisa | 0:6089ae824f06 | 23 | |
tosihisa | 0:6089ae824f06 | 24 | #endif /* } */ |