sensore di umidità e temperatura

Dependencies:   mbed DHT

Files at this revision

API Documentation at this revision

Comitter:
ajeet3004
Date:
Mon Nov 27 05:24:09 2017 +0000
Parent:
1:aedc2645d841
Commit message:
ertyu;

Changed in this revision

DHT.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
diff -r aedc2645d841 -r 4f9613cebdae DHT.lib
--- a/DHT.lib	Fri Apr 21 07:02:29 2017 +0000
+++ b/DHT.lib	Mon Nov 27 05:24:09 2017 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/teams/components/code/DHT/#df22ddf10d75
+https://os.mbed.com/users/ajeet3004/code/DHT/#2b642d2b64f8
diff -r aedc2645d841 -r 4f9613cebdae main.cpp
--- a/main.cpp	Fri Apr 21 07:02:29 2017 +0000
+++ b/main.cpp	Mon Nov 27 05:24:09 2017 +0000
@@ -2,7 +2,7 @@
 #include "DHT.h"
 
 #define   DHT_DATA_PIN  D4
- 
+ Serial out(USBTX,USBRX);
 DHT sensor(DHT_DATA_PIN, DHT11);                    //DHT(PinName pin, eType DHTtype)
  
 int main()
@@ -13,7 +13,9 @@
     while(1) 
     {
         wait(2.0f);                                 //wait 2 second
-        error = sensor.readData();                  //read error value
+        error = sensor.readData(); 
+       // c   = sensor.ReadTemperature(CELCIUS);                 //read error value
+      //   out.printf(" Celcius: %4.2f",c);
         if (error == 0)                             //case: no error 
         {
             c   = sensor.ReadTemperature(CELCIUS);