Tempy pls

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
nbharaths
Date:
Thu May 29 08:42:12 2014 +0000
Parent:
1:a9c3fbd4685f
Commit message:
Temp sens w/ delay; ;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu May 29 04:20:37 2014 +0000
+++ b/main.cpp	Thu May 29 08:42:12 2014 +0000
@@ -3,15 +3,16 @@
 
 AnalogIn Temp(p15);
 
-int main() {
-while(1)
+int main()
 {
-  float temperature=((Temp.read()*3300-2597)/(-13.6));
-  
-  pc.printf("%f\n",temperature);
-  
-  wait(6.0);
-}
-  
+    while(1) {
+        float a=Temp.read();
+        float temperature=((a*3300-2629.42504)/(-13.74697));
+        pc.printf("%f\n",Temp.read());
+        pc.printf("%f\n",temperature);
+
+        wait(6.0);
+    }
+
 
 }
\ No newline at end of file