2016-05-18 09:42:06 +02:00
|
|
|
/*
|
|
|
|
* Witty Cloud
|
|
|
|
* development board, featuring RGB LED, LDR and a button
|
|
|
|
* added hardware: DHT22 temperature and humidity sensor
|
|
|
|
*
|
|
|
|
* Settings in IDE:
|
|
|
|
* - Board: "WeMos D1 R2 & mini"
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "DeviceRgb.h"
|
|
|
|
#include "DeviceLdr.h"
|
|
|
|
#include "DeviceButton.h"
|
|
|
|
#include "DeviceDht.h"
|
|
|
|
|
|
|
|
const char* FWNAME = "things@WittyDht";
|
|
|
|
|
|
|
|
const byte PIN_RGB_RED = D8;
|
|
|
|
const byte PIN_RGB_GREEN = D6;
|
|
|
|
const byte PIN_RGB_BLUE = D7;
|
|
|
|
DeviceRgb deviceRgb(PIN_RGB_RED, PIN_RGB_GREEN, PIN_RGB_BLUE);
|
|
|
|
|
|
|
|
const byte PIN_LDR = A0;
|
|
|
|
DeviceLdr deviceLdr(PIN_LDR);
|
|
|
|
|
|
|
|
const byte PIN_BUTTON = D2;
|
|
|
|
DeviceButton deviceButton(PIN_BUTTON);
|
|
|
|
|
|
|
|
const byte PIN_DHT = D5;
|
|
|
|
const byte TYPE_DHT = DHT22;
|
|
|
|
DeviceDht deviceDht(PIN_DHT, TYPE_DHT);
|
|
|
|
|
|
|
|
Device* devices[] = {
|
|
|
|
&deviceRgb,
|
|
|
|
&deviceLdr,
|
|
|
|
&deviceButton,
|
|
|
|
&deviceDht,
|
|
|
|
};
|
2016-05-21 19:19:24 +02:00
|
|
|
|
|
|
|
void hardwareSetup() {};
|
2016-12-23 00:03:36 +01:00
|
|
|
|
|
|
|
void hardwareLoop() {};
|