Code for sensor nodes connected by radio receiver with gateway

Dependencies:   mbed WakeUp coapRadioClient DHT11

moistureMeter.cpp

Committer:
Ka_myk
Date:
22 months ago
Revision:
7:2393eb882f82

File content as of revision 7:2393eb882f82:

#include "moistureMeter.h"
#include "dbg.h"

int MoistureMeter::read() {
    DBG("Reading moisture...\n\r");
    int readValue = (int)1000*analogIn.read();
    DBG("Moisture read: %d\n\r", readValue);
    return readValue;
}

int MoistureMeter::getSensorId() {
    return 2;
}

void MoistureMeter::initialize() {
    DBG("Moisture sensor initialized");
}