added new device type IrRx (infrared receiver)
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
#include "DeviceLed.h"
|
||||
#include "DeviceLdr.h"
|
||||
#include "DeviceDht.h"
|
||||
#include "DeviceIrRx.h"
|
||||
|
||||
// HAS_LED
|
||||
#define PIN_LED_RED D8
|
||||
@ -19,7 +20,12 @@ DeviceLdr deviceLdr(PIN_LDR);
|
||||
#define TYPE_DHT DHT22
|
||||
DeviceDht deviceDht(PIN_DHT, TYPE_DHT);
|
||||
|
||||
Device* devices[] = { &deviceLed, &deviceLdr };
|
||||
// HAS_IRRX
|
||||
#define PIN_IRRX D1
|
||||
#define PIN_POWER D2
|
||||
DeviceIrRx deviceIrRx(PIN_IRRX, PIN_POWER);
|
||||
|
||||
Device* devices[] = { &deviceLed, &deviceLdr, &deviceIrRx };
|
||||
|
||||
void setupHandler() {
|
||||
for (int i = 0; i < sizeof(devices) / sizeof(*devices); i++) {
|
||||
|
Reference in New Issue
Block a user