This is the sample code for Gravity: Analog pH Sensor / Meter Kit V2, SKU:SEN0161-V2
SKU: SEN0161-V2
Analog pH meter V2 is specifically designed to measure the pH of the solution and reflect the acidity or alkalinity. DFRobot ph sensor is commonly used in various applications such as aquaponics, aquaculture, and environmental water testing.
To use this library, first download the library file, paste it into the \Arduino\libraries directory, then open the examples folder and run the demo in the folder.
Depends library: https://github.com/DFRobot/DFRobot_EC
/**
* @fn calibration
* @brief Calibrate the calibration data
*
* @param voltage : Voltage value
* @param temperature : Ambient temperature
* @param cmd : enterph -> enter the PH calibration mode
* @n calph -> calibrate with the standard buffer solution, two buffer solutions(4.0 and 7.0) will be automaticlly recognized
* @n exitph -> save the calibrated parameters and exit from PH calibration mode
*/
void calibration(float voltage, float temperature,char* cmd); //calibration by Serial CMD
void calibration(float voltage, float temperature);
/**
* @fn readPH
* @brief Convert voltage to PH with temperature compensation
* @note voltage to pH value, with temperature compensation
*
* @param voltage : Voltage value
* @param temperature : Ambient temperature
* @return The PH value
*/
float readPH(float voltage, float temperature);
/**
* @fn begin
* @brief Initialization The Analog pH Sensor
*/
void begin();
MCU | Work Well | Work Wrong | Untested | Remarks |
---|---|---|---|---|
Arduino Uno | √ | |||
Leonardo | √ | |||
Meag2560 | √ | |||
esp32 series | x |
Written by Jiawei Zhang(jiawei.zhang@dfrobot.com), 2018. (Welcome to our website)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。