testgsosg / Mbed 2 deprecated LCD_Temp_Sensor

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
tobbl2210
Date:
Fri Jul 06 07:22:50 2018 +0000
Commit message:
test

Changed in this revision

TextLCD.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
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/TextLCD.lib	Fri Jul 06 07:22:50 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#308d188a2d3a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jul 06 07:22:50 2018 +0000
@@ -0,0 +1,60 @@
+#include "mbed.h"
+#include "TextLCD.h"
+
+TextLCD lcd(PA_9, PC_7, PB_5, PB_4, PB_10, PA_8); // rs, e, d4-d7  //// wird benötigt fur LCD Display
+DigitalIn button(USER_BUTTON);
+AnalogIn adc0 (PA_0);
+AnalogIn temp (PC_2);
+
+int main()
+{
+
+
+
+lcd.cls();
+lcd.locate(0,0);
+           // command mode
+wait(0.015); 
+
+float value=0;
+
+float messwert=0;
+lcd.locate(0,0);
+lcd.printf("Temperatur");
+
+ 
+while(1) 
+{
+float valuenew=0;
+
+for(int index=100; index>0; index--)
+
+{ 
+    value = temp.read();
+    
+    
+    
+    valuenew = valuenew+value;
+
+    
+}  
+    
+       
+
+   
+        
+      
+        messwert= 3.3*valuenew/100*100; // V in Temp
+                    
+        lcd.locate(0,1);
+        lcd.printf("Value %2f ",messwert);
+        
+         wait(1);
+   
+    
+            
+               
+    }
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jul 06 07:22:50 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a7c7b631e539
\ No newline at end of file