poti

Dependencies:   C12832_lcd mbed

Files at this revision

API Documentation at this revision

Comitter:
tauchi88
Date:
Thu Jan 28 19:54:31 2016 +0000
Commit message:
poti

Changed in this revision

C12832_lcd.lib Show annotated file Show diff for this revision Revisions of this file
Temperatur_einlesen.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/C12832_lcd.lib	Thu Jan 28 19:54:31 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/the-new-engineer-s/code/C12832_lcd/#4a09a5e0d6d8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Temperatur_einlesen.cpp	Thu Jan 28 19:54:31 2016 +0000
@@ -0,0 +1,44 @@
+#include "mbed.h"
+#include "C12832_lcd.h"
+
+//Poti1 und Poti2 extra einlesen ud auf 2 Zeilen am Display ausgeben
+//Poti1 hat die höchstmögliche Abtastfrequenz (sampletime)
+//Poti2 hat eine sehr niedrige Abtastfrequenz
+
+AnalogIn pot1(p19);
+AnalogIn pot2(p20);
+C12832_LCD lcd;
+Ticker t1, t2;
+bool updateLcd = true;
+
+
+void Pot1()
+{
+    lcd.locate(0,5);
+    lcd.printf("Port 1: %f ",pot1.read());
+    }
+    
+void Pot2()
+{
+    lcd.locate(0,15);
+    lcd.printf("Port 2: %u ",pot2.read_u16());
+    }   
+    
+     
+int main() {
+    
+    lcd.cls();
+
+    t1.attach(&Pot1, 1.00);
+    t2.attach(&Pot2, 0.10);
+    
+    while(1)
+    {
+        if (updateLcd) 
+            updateLcd = false;
+        
+
+        
+
+        }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Jan 28 19:54:31 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6f327212ef96
\ No newline at end of file