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
Revision 5:8ec4c03f4079, committed 2015-04-14
- 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);
