User Tools

Site Tools


arduino_lib_dpcssoilsensor

Documentation Arduino base program code

DpCSSoilSensor library

Description

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

Functions

// 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();

Contact

Author: Dubravko Penezic

Email: dpenezic@gmail.com

Version

Actual

History

V 1.0.0 , 03.02.2014

arduino_lib_dpcssoilsensor.txt · Last modified: 2016/09/01 14:17 (external edit)