Chirp is a great little soil moisture sensor. This is a library for the Chirp soil moisture sensor. It supports reading Capacitance (soil moisture) and soil temperature. You can get Chirp on Tindie https://www.tindie.com/products/miceuz/i2c-soil-moisture-sensor/ And read documentation on github https://www.tindie.com/products/miceuz/i2c-soil-moisture-sensor/
Chirp.h
- Committer:
- Vlad
- Date:
- 2017-01-20
- Revision:
- 1:faff11456df9
- Parent:
- 0:6164b94deb27
File content as of revision 1:faff11456df9:
#ifndef MBED_CHIRP_H #define MBED_CHIRP_H #include "mbed.h" //#define _DEBUG #define DEFAULT_SLAVE_ADDRESS (0x20 << 1) class Chirp { public: Chirp(PinName sda, PinName sck, char slave_adr = DEFAULT_SLAVE_ADDRESS); float getCapacitance(void); float getTemperature(void); private: I2C *i2c_p; I2C &i2c; char address; }; #endif // MBED_CHIRP_H