Things/things/DeviceLdr.h

21 lines
420 B
C
Raw Normal View History

2016-04-22 22:32:36 +02:00
#pragma once
2016-04-08 10:18:59 +02:00
#include "Device.h"
#include <Homie.h>
class DeviceLdr : public Device {
public:
inline DeviceLdr(byte ldrPin) {
pin = ldrPin;
}
2016-04-11 00:29:05 +02:00
virtual void deviceSetup();
virtual void deviceRegister();
virtual void deviceLoop();
2016-04-08 10:18:59 +02:00
private:
byte pin;
const int INTERVAL_LDR = 60;
unsigned long lastSentLDR = 0;
int ldr = 0;
2016-04-10 00:20:50 +02:00
HomieNode ldrNode = HomieNode("ldr", "ldr");
2016-04-08 10:18:59 +02:00
};