Celsius version.
main.cpp@0:21964426da4c, 2018-05-18 (annotated)
- Committer:
- ryo_kamiya
- Date:
- Fri May 18 07:00:36 2018 +0000
- Revision:
- 0:21964426da4c
Celsius version.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ryo_kamiya | 0:21964426da4c | 1 | #include "mbed.h" |
ryo_kamiya | 0:21964426da4c | 2 | #include "Dht11.h" |
ryo_kamiya | 0:21964426da4c | 3 | |
ryo_kamiya | 0:21964426da4c | 4 | Serial pc(USBTX, USBRX); |
ryo_kamiya | 0:21964426da4c | 5 | Dht11 sensor(D7); |
ryo_kamiya | 0:21964426da4c | 6 | |
ryo_kamiya | 0:21964426da4c | 7 | int main() { |
ryo_kamiya | 0:21964426da4c | 8 | sensor.read(); |
ryo_kamiya | 0:21964426da4c | 9 | pc.printf("T: %d, H: %d\r\n", sensor.getCelsius(), sensor.getHumidity()); |
ryo_kamiya | 0:21964426da4c | 10 | } |