Celsius version.
Revision 0:21964426da4c, committed 2018-05-18
- Comitter:
- ryo_kamiya
- Date:
- Fri May 18 07:00:36 2018 +0000
- Commit message:
- Celsius version.
Changed in this revision
DHT11.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 000000000000 -r 21964426da4c DHT11.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DHT11.lib Fri May 18 07:00:36 2018 +0000 @@ -0,0 +1,1 @@ +http://os.mbed.com/users/fossum_13/code/DHT11/#5da6f6de3e42
diff -r 000000000000 -r 21964426da4c main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri May 18 07:00:36 2018 +0000 @@ -0,0 +1,10 @@ + #include "mbed.h" + #include "Dht11.h" + + Serial pc(USBTX, USBRX); + Dht11 sensor(D7); + + int main() { + sensor.read(); + pc.printf("T: %d, H: %d\r\n", sensor.getCelsius(), sensor.getHumidity()); + } \ No newline at end of file