first version with working relay function
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user