SmartD / Mbed 2 deprecated mbed_pH_test

Dependencies:   mbed

Fork of mbed_pH225 by SmartD

Files at this revision

API Documentation at this revision

Comitter:
huzaifabeg
Date:
Tue Apr 14 23:38:37 2015 +0000
Parent:
4:bc63632c6808
Commit message:
Working pH and kinda working temperature

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Apr 02 04:53:05 2015 +0000
+++ b/main.cpp	Tue Apr 14 23:38:37 2015 +0000
@@ -42,7 +42,9 @@
         pH = (voltage-.60924)/.05226667;
         //conversion to degrees C from sensor output voltage
         float voltageT = avgTemp*3.3*1000;
-        tempC = ((voltageT - 435.49)/-2.93);
+        //following equation is based off of a very rough calculation
+        tempC = ((voltageT - 616.4)/-1.93);
+        
         tempF = (tempC *9/5) + 32;
         //print current pH and temp
         pc.printf("pH = %5.2F at voltage %5.2F V\n\r", pH, voltage);