Celsius version.

Dependencies:   DHT11

Committer:
ryo_kamiya
Date:
Fri May 18 07:00:36 2018 +0000
Revision:
0:21964426da4c
Celsius version.

Who changed what in which revision?

UserRevisionLine numberNew 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 }