Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Wire.h>
- #include <LiquidCrystal.h>
- LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
- int pHSense = A0;
- void setup() {
- Serial.begin(9600);
- delay(100);
- //Wire.begin(2,14);
- //lcd.init();
- //lcd.backlight();
- //lcd.setCursor(0,0);
- //lcd.print("14CORE | pH Probe ");
- //lcd.setCursor(0,1);
- //lcd.print(">Initializing...");
- //delay(4000);
- // lcd.clear();
- //lcd.setCursor(0,0);
- //lcd.print("14CORE | pH Sense");
- Serial.println("14CORE | pH Sense");
- }
- void loop(){
- int measuringVal = analogRead(pHSense);
- Serial.print("Measuring Raw Value > ");
- Serial.print(measuringVal);
- double vltValue = 5/1024.0 * measuringVal;
- Serial.print("Voltage Value > ");
- Serial.print(vltValue, 3);
- float P0 = 7 + ((2.5 - vltValue) / 0.18);
- Serial.print("");
- Serial.print("pH Value > ");
- Serial.print(P0, 3);
- Serial.print("");
- delay(3000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement