first version with working relay function

This commit is contained in:
2016-12-14 23:14:17 +01:00
parent 7fd1d56eae
commit e59d3d0f73
3 changed files with 64 additions and 1 deletions

View File

@@ -9,14 +9,22 @@
*/
#include "DeviceButton.h"
#include "DeviceRelay.h"
const char* FWNAME = "things@Sonoff";
const byte PIN_BUTTON = 0;
DeviceButton deviceButton(PIN_BUTTON);
const byte PIN_RELAY = 12;
DeviceRelay deviceRelay(PIN_RELAY, "relay");
Device* devices[] = {
&deviceButton,
&deviceRelay,
};
void hardwareSetup() {};
void hardwareSetup() {
pinMode(PIN_RELAY, OUTPUT);
digitalWrite(PIN_RELAY, HIGH);
};