S. Ken San
/
KL05Z_DHT11
Example using DHT11 with KL05Z. DHT library from teams/components/code/DHT
Revision 1:d2396e83a3b9, committed 2014-08-16
- Comitter:
- kenno
- Date:
- Sat Aug 16 11:33:44 2014 +0000
- Parent:
- 0:052ced68c756
- Commit message:
- Initial commit.
Changed in this revision
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