Documentation Arduino base program code
DpCSSoilSensor Arduino library provide function for gething data form Capacitive Soil Sensor.
Most part of code come from original CapSense library !
Source code is provided as is, without any warranty.
Distributetd under CC BY v 3.0
// Initialisation method which set sendPin and receivePin
DpCSSoilSensor(uint8_t sendPin, uint8_t receivePin);
// set number of samples
void setSamples(uint8_t samp);
// get number of samples
uint8_t getSamples();
// set timeout in milliseconds
void setTimeoutMillis(unsigned long timeoutm);
// get timeout in milliseconds
unsigned long getTimeoutMillis();
// set dry capacitive value
void setDry(long CSValue);
// get preset dry value
long getDry();
// set wet capacitive value
void setWet(long CSValue);
// get preset wet value
long getWet();
// get raw capacitive data
long getRaw();
// return percentage of wetnes or error code
// -2 - measuring timeout
// -10 - no measuring
// -20 - wrong pin
// -41 - higher then wet value
// -42 - lover then dry value
float getValue();
Author: Dubravko Penezic
Email: dpenezic@gmail.com