Skip to content

Arduino library for Gravity: Analog pH Sensor / Meter Kit V2, SKU: SEN0161-V2

Notifications You must be signed in to change notification settings

FarkadAdnan/DFRobot_PH-master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

DFRobot_PH-master

Arduino library for Gravity: Analog pH Sensor / Meter Kit V2, SKU: SEN0161-V2

Chapter 3 code_Project_72 The second part 2 of "The Arduino World Book" code_Project_72

  • code_Project_72
  • By:Farkad Adnan فرقد عدنان - -E-mail: farkad.hpfa95@gmail.com -inst : farkadadnan
  • #farkadadnan , #farkad_adnan , فرقد عدنان#
  • FaceBook: كتاب عالم الاردوينو
  • inst : arduinobook
  1. #كتاب_عالم_الاردوينو
  2. #كتاب_عالم_الآردوينو

Twitter Follow

SEN0161-V2

Summary

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.

aa

enterph

  1. Input enterph command in the serial monitor to enter the calibration mode. 3

2.Input calph commands in the serial monitor to start the calibration. The program will automatically identify which of the two standard buffer solutions is present: either 4.0 and 7.0. In this step, the standard buffer solution of 7.0 will be identified. 4

  1. After the calibration, input exitph command in the serial monitor to save the relevant parameters and exit the calibration mode. Note: Only after inputing exitph command in the serial monitor can the relevant parameters be saved. 5
//By:Farkad Adnan
#include "DFRobot_PH.h"
#include <EEPROM.h>
#define PH_PIN A1
float voltage,phValue,temperature = 25;
DFRobot_PH ph;
void setup(){
    Serial.begin(115200);  
    ph.begin();
}
void loop(){
    static unsigned long timepoint = millis();
    if(millis()-timepoint>1000U){                  
        timepoint = millis();
        voltage = analogRead(PH_PIN)/1024.0*5000;  
        phValue = ph.readPH(voltage,temperature);  
        Serial.print("temperature:");
        Serial.print(temperature,1);
        Serial.print("^C  pH:");
        Serial.println(phValue,2);
    }
    ph.calibration(voltage,temperature);          
}
float readTemperature(){
}

About

Arduino library for Gravity: Analog pH Sensor / Meter Kit V2, SKU: SEN0161-V2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages