hin you / Mbed 2 deprecated Pressure

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
youhinclark
Date:
Mon Aug 03 10:31:13 2015 +0000
Parent:
0:d86587ed9b1c
Commit message:
Pressure

Changed in this revision

Analog_in_iia.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Analog_in_iia.lib	Mon Aug 03 10:31:13 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/hasimo/code/Analog_in_iia/#d86587ed9b1c
--- a/main.cpp	Mon Jul 28 04:49:01 2014 +0000
+++ b/main.cpp	Mon Aug 03 10:31:13 2015 +0000
@@ -8,8 +8,11 @@
     float adc;
     
     while (1){
+        adc=ain.read();
+        adc*=3.3;
+        adc=250/((3.5-adc)*(3.5-adc));
         lcd.locate(0,0);
-        lcd.printf("%8.3f \n", ain.read());
+        lcd.printf("%8.3f \n", adc);
         wait(0.05);                 // 20Hz update rate
     }
 }
\ No newline at end of file