Skip to content

DFRobot/DFRobot_EC

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
November 2, 2018 10:38
November 2, 2018 10:38
March 21, 2018 16:54
November 2, 2018 10:38
November 2, 2018 10:38
August 25, 2021 10:40
March 21, 2018 16:54
November 6, 2018 09:37
March 21, 2018 17:31

DFRobot_EC Library


This is the sample code for Gravity: Analog Electrical Conductivity Sensor / Meter Kit V2 (K=1.0), SKU: DFR0300.

Table of Contents

Methods

/*
 * @brief Init The Analog Electrical Conductivity Sensor
 */
void begin();

/*
 * @brief Convert voltage to EC with temperature compensation
 *
 * @param voltage     : Voltage value
 *        temperature : Ambient temperature
 *
 * @return The EC value
 */
float readEC(float voltage, float temperature);

/*
 * @brief Calibrate the calibration data
 *
 * @param voltage     : Voltage value
 *        temperature : Ambient temperature
 *        cmd         : enterec -> enter the EC calibration mode
 *                      calec   -> calibrate with the standard buffer solution, two buffer solutions(1413us/cm and 12.88ms/cm) will be automaticlly recognized
 *                      exitec  -> save the calibrated parameters and exit from EC calibration mode
 */
void calibration(float voltage, float temperature, char* cmd);

Compatibility

MCU Work Well Work Wrong Untested Remarks
Arduino Uno
Leonardo
Meag2560

History

  • date 2018-11-6
  • version V1.0

Credits

Written by Jiawei Zhang(Welcome to our website)

About

Arduino library for Gravity: Analog Electrical Conductivity Sensor / Meter Kit V2 (K=1.0), SKU: DFR0300

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published