Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of mbed_pH225 by
Diff: main.cpp
- Revision:
- 4:bc63632c6808
- Parent:
- 3:98adc27dc82d
- Child:
- 5:8ec4c03f4079
--- a/main.cpp Tue Mar 31 23:47:27 2015 +0000
+++ b/main.cpp Thu Apr 02 04:53:05 2015 +0000
@@ -39,10 +39,10 @@
//look at the documentation to figure out what readout correlates to what voltage
voltage = avgSensor*(3.3);
//conversion to pH from sensor output voltage per LM61 data sheet
- pH = (0.0209*voltage)-12.696;
+ pH = (voltage-.60924)/.05226667;
//conversion to degrees C from sensor output voltage
- float voltageT = avgTemp*3.3;
- tempC = (((voltageT/1000) - 1.022129)/-0.0018496);
+ float voltageT = avgTemp*3.3*1000;
+ tempC = ((voltageT - 435.49)/-2.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);
