split hardware configuration to modules
This commit is contained in:
28
things/HardwareWitty.h
Normal file
28
things/HardwareWitty.h
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Witty Cloud
|
||||
* development board, featuring RGB LED, LDR and a button
|
||||
*
|
||||
* Settings in IDE:
|
||||
* - Board: "WeMos D1 R2 & mini"
|
||||
*/
|
||||
|
||||
#include "DeviceRgb.h"
|
||||
#include "DeviceLdr.h"
|
||||
#include "DeviceButton.h"
|
||||
|
||||
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);
|
||||
|
||||
Device* devices[] = {
|
||||
&deviceRgb,
|
||||
&deviceLdr,
|
||||
&deviceButton,
|
||||
};
|
Reference in New Issue
Block a user