Code for sensor nodes connected by radio receiver with gateway

Dependencies:   mbed WakeUp coapRadioClient DHT11

Revision:
1:c3b4feacfb6c
Parent:
0:4c0d384fd5cf
Child:
3:4ffffdb5230f
--- a/humidityMeter.cpp	Thu Jan 24 16:40:14 2019 +0000
+++ b/humidityMeter.cpp	Thu Jan 24 17:44:04 2019 +0000
@@ -8,7 +8,7 @@
 int HumidityMeter::read() {
     int s = dht.readData();
     if (s != DHT11::OK) {
-        return -1;
+        return s * -1;
     } else {
         return dht.readHumidity();
     }