Example using DHT11 with KL05Z. DHT library from teams/components/code/DHT

Dependencies:   DHT mbed

Files at this revision

API Documentation at this revision

Comitter:
kenno
Date:
Sat Aug 16 11:33:44 2014 +0000
Parent:
0:052ced68c756
Commit message:
Initial commit.

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
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 052ced68c756 -r d2396e83a3b9 DHT.lib
--- a/DHT.lib	Wed Aug 13 13:44:15 2014 +0000
+++ b/DHT.lib	Sat Aug 16 11:33:44 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/Wimpie/code/DHT/#bc5415405cad
+http://mbed.org/teams/components/code/DHT/#df22ddf10d75
diff -r 052ced68c756 -r d2396e83a3b9 main.cpp
--- a/main.cpp	Wed Aug 13 13:44:15 2014 +0000
+++ b/main.cpp	Sat Aug 16 11:33:44 2014 +0000
@@ -12,7 +12,7 @@
     
     wait(1);    // wait 1 sec for device stable
     while (true) {
-        myled = 1;
+        myled = 0;  // 0: on
         err = sensor.readData();
         if (err == 0) {
             pc.printf("Temperature is %4.2f C \r\n", sensor.ReadTemperature(CELCIUS));
@@ -24,7 +24,7 @@
         else {
             printf("\r\nErr %i \n", err);    
         }
-        myled = 0;
+        myled = 1;
         wait(15);
     }
 }
diff -r 052ced68c756 -r d2396e83a3b9 mbed.bld
--- a/mbed.bld	Wed Aug 13 13:44:15 2014 +0000
+++ b/mbed.bld	Sat Aug 16 11:33:44 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/6213f644d804
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013
\ No newline at end of file