Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SoftSerial MAX14690 Buffer
Fork of rtos_threading_with_callback by
Diff: acquireDHT/getDHT.cpp
- Revision:
- 3:d7ec6dc025b0
- Parent:
- 2:bf699e054b34
--- a/acquireDHT/getDHT.cpp Sun Feb 25 16:40:28 2018 +0000 +++ b/acquireDHT/getDHT.cpp Fri Mar 30 10:32:10 2018 +0000 @@ -2,6 +2,7 @@ #include "DHT.h" #include "rtos.h" #include "global.h" +#include "logger.h" class DHTData { @@ -16,6 +17,10 @@ float h = dht.ReadHumidity(); humidity = h; float dpf = dht.CalcdewPointFast(c, h); + char *buffer = new char[50]; + sprintf(buffer, "Temperature: %3.2f, Humidity: %3.2f\r\n", c,h); + Logger::log(buffer); + printf("DHT: Temperature in Celcius: %4.2f\r\n", c); printf("DHT: Humidity is %4.2f, Dewpoint: %4.2f\r\n", h, dpf);