GSOE Webserver ESP01 DHT11

Dependencies:   LCD_i2c_GSOE ESP8266WebserverGSOE

Files at this revision

API Documentation at this revision

Comitter:
jack1930
Date:
Tue Jul 27 10:57:15 2021 +0000
Parent:
5:c390b6da4538
Commit message:
kleinere Korrekturen

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r c390b6da4538 -r e835ed92db95 main.cpp
--- a/main.cpp	Tue Jul 27 09:39:37 2021 +0000
+++ b/main.cpp	Tue Jul 27 10:57:15 2021 +0000
@@ -15,8 +15,8 @@
 //Anschluss - an GND
 //mittlerer Anschluss an 3,3V
 
-int humidity;
-int temperature;
+int humidity,hum;
+int temperature,temp;
 
 //########################################
 // DHT11 Library
@@ -119,8 +119,8 @@
       webpage+="</head>";
       webpage+="<body>";
       webpage+="<h1>WIFI mit STM32 ESP01</h1>\n";
-      webpage+="<p>Tmp:"+to_string(temperature)+" C</p>\n"; 
-      webpage+="<p>Hum:"+to_string(humidity)+"%</p>\n"; 
+      webpage+="<p>Tmp:"+to_string(temp)+" C</p>\n"; 
+      webpage+="<p>Hum:"+to_string(hum)+"%</p>\n"; 
       webpage+="</body>";
       webpage+="</html>";
       return webpage;
@@ -149,6 +149,8 @@
 
             mylcd.cursorpos(0x40);
             mylcd.printf("Hum %2d%%  Tmp %2dc  ", humidity, temperature);
+            hum=humidity;
+            temp=temperature;
             wait_us(500000);