Code for sensor nodes connected by radio receiver with gateway

Dependencies:   mbed WakeUp coapRadioClient DHT11

humidityMeter.cpp

Committer:
Ka_myk
Date:
24 months ago
Revision:
0:4c0d384fd5cf
Child:
1:c3b4feacfb6c

File content as of revision 0:4c0d384fd5cf:

//
// Created by Kamil Mykitiuk on 2019-01-21.
//

#include "humidityMeter.h"
#include "dbg.h"

int HumidityMeter::read() {
    int s = dht.readData();
    if (s != DHT11::OK) {
        return -1;
    } else {
        return dht.readHumidity();
    }

}

int HumidityMeter::getSensorId() {
    return 1;
}

void HumidityMeter::initialize() {
    DBG("Sensor initialized");
}