scooter / Mbed 2 deprecated Scooter-uC-Programm

Dependencies:   mbed

Revision:
5:d213c03872fe
Parent:
2:096c68d6a316
Child:
7:ed9a83df000a
--- a/Messdatenerfassung.cpp	Tue May 19 14:33:55 2015 +0000
+++ b/Messdatenerfassung.cpp	Tue May 19 15:01:43 2015 +0000
@@ -6,4 +6,23 @@
      
      
      
-     }
\ No newline at end of file
+     }
+     
+float hall_umrechnung()
+{
+    float meas0;
+    meas0 = analog_value0.read() - 0.27;
+    if(meas0 < 0)
+    {
+        meas0 = 0;
+    }
+    
+    meas0 = meas0*2;
+    
+    if(meas0 > 1)
+    {
+        meas0 = 1;
+    }
+    
+    return meas0;    
+}
\ No newline at end of file