Hauptprogramm
Dependencies: ILI9340_Driver_Lib PM2_Libary Lib_DFPlayerMini
Feuchtigkeitssensor/Chirp.h@29:91df2c5fb297, 2021-05-05 (annotated)
- Committer:
- ackerden
- Date:
- Wed May 05 15:25:02 2021 +0000
- Revision:
- 29:91df2c5fb297
- Parent:
- 27:bbcd157dcd63
audio;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ackerden | 27:bbcd157dcd63 | 1 | #ifndef MBED_CHIRP_H |
ackerden | 27:bbcd157dcd63 | 2 | #define MBED_CHIRP_H |
ackerden | 27:bbcd157dcd63 | 3 | |
ackerden | 27:bbcd157dcd63 | 4 | #include "mbed.h" |
ackerden | 27:bbcd157dcd63 | 5 | |
ackerden | 27:bbcd157dcd63 | 6 | //#define _DEBUG |
ackerden | 29:91df2c5fb297 | 7 | #define DEFAULT_SLAVE_ADDRESS (0x49 << 1) |
ackerden | 27:bbcd157dcd63 | 8 | |
ackerden | 27:bbcd157dcd63 | 9 | |
ackerden | 27:bbcd157dcd63 | 10 | class Chirp |
ackerden | 27:bbcd157dcd63 | 11 | { |
ackerden | 27:bbcd157dcd63 | 12 | public: |
ackerden | 27:bbcd157dcd63 | 13 | Chirp(PinName sda, PinName sck, char slave_adr = DEFAULT_SLAVE_ADDRESS); |
ackerden | 27:bbcd157dcd63 | 14 | float getCapacitance(void); |
ackerden | 27:bbcd157dcd63 | 15 | float getTemperature(void); |
ackerden | 27:bbcd157dcd63 | 16 | |
ackerden | 27:bbcd157dcd63 | 17 | private: |
ackerden | 27:bbcd157dcd63 | 18 | |
ackerden | 27:bbcd157dcd63 | 19 | I2C *i2c_p; |
ackerden | 27:bbcd157dcd63 | 20 | I2C &i2c; |
ackerden | 27:bbcd157dcd63 | 21 | char address; |
ackerden | 27:bbcd157dcd63 | 22 | }; |
ackerden | 27:bbcd157dcd63 | 23 | |
ackerden | 27:bbcd157dcd63 | 24 | void getResults(); |
ackerden | 27:bbcd157dcd63 | 25 | |
ackerden | 27:bbcd157dcd63 | 26 | |
ackerden | 27:bbcd157dcd63 | 27 | #endif // MBED_CHIRP_H |