Test

Dependencies:   mbed TextLCD DHT

Files at this revision

API Documentation at this revision

Comitter:
armandotill
Date:
Fri Nov 30 03:14:23 2018 +0000
Commit message:
Practica_1_1

Changed in this revision

DHT.lib Show annotated file Show diff for this revision Revisions of this file
TextLCD_Enhanced.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/DHT.lib	Fri Nov 30 03:14:23 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/Wimpie/code/DHT/#9b5b3200688f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD_Enhanced.lib	Fri Nov 30 03:14:23 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/wim/code/TextLCD/#111ca62e8a59
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Nov 30 03:14:23 2018 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+#include "TextLCD.h"
+#include "DHT.h"
+
+DigitalOut myled(LED1);
+DHT sensor(p21,DHT11);
+
+TextLCD lcd(p15, p16, p17, p18, p19, p20); 
+
+int main() {
+     
+    int err;
+    float T;
+    float H;
+    
+    while (1) {
+        myled = 1;
+        err = sensor.readData();
+        wait(1);
+        T = sensor.ReadTemperature(CELCIUS);
+        H = sensor.ReadHumidity();
+        
+        if (err == 0) 
+        {
+            lcd.printf(" Temp:%4.2f C \n",T);
+            lcd.printf("  Hum:%4.2f \n",H);
+        } 
+        myled = 0;
+        wait(1);
+    }
+}
+    
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Nov 30 03:14:23 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e