SEDO subject project
Dependencies: ds3231 mbed-rtos mbed DHT
Diff: temp_hum_sensor.cpp
- Revision:
- 10:f14f47225091
- Parent:
- 9:5e9c4277151d
- Child:
- 11:a9f41d6489c9
--- a/temp_hum_sensor.cpp Mon May 08 07:20:54 2017 +0000 +++ b/temp_hum_sensor.cpp Mon May 08 17:13:57 2017 +0000 @@ -8,7 +8,7 @@ #include "temp_hum_sensor.h" #include "DHT.h" -static DHT DHTSensor(D6, DHT11); +static DHT DHTSensor(D2, DHT11); static DigitalOut DHTEnable(D7); static float tempCurr, humCurr, dewPCurr; uint32_t temp_hum_init(void const *args) @@ -46,16 +46,18 @@ mutexData.unlock(); attempts++; Thread::wait(3000); - /* //DEBUG + //DEBUG mutexPCComm.lock(); - printf("DHTError: %d\n", DHTError); + printf("DHTError: %d\n", error); mutexPCComm.unlock(); - */ + } + /* // DEBUG mutexPCComm.lock(); - printf("DHTError: attempt %d\n", attempts); + printf("DHTError: attempt %d %d %d %4.2f\n", attempts, error,sensors_running,tempCurr); mutexPCComm.unlock(); + */ } // while read attempts } // main thread while } // thread function