31 lines
529 B
C
31 lines
529 B
C
/*
|
|
* Sonoff
|
|
* off-the-shelf wifi relay module
|
|
*
|
|
* Settings in IDE:
|
|
* - Board: "Generic ESP8266 Module"
|
|
* - Flash Size: "1M (64k SPIFFS)"
|
|
* - Upload Speed: "1152200"
|
|
*/
|
|
|
|
#include "DeviceRelay.h"
|
|
|
|
const char* FWNAME = "things@Sonoff";
|
|
|
|
const byte PIN_BUTTON = 0;
|
|
|
|
const byte PIN_RELAY = 12;
|
|
DeviceRelay deviceRelay(PIN_RELAY, "relay");
|
|
|
|
Device* devices[] = {
|
|
&deviceRelay,
|
|
};
|
|
|
|
void hardwareSetup() {
|
|
Homie.setLedPin(13, HIGH);
|
|
pinMode(PIN_RELAY, OUTPUT);
|
|
digitalWrite(PIN_RELAY, HIGH);
|
|
};
|
|
|
|
void hardwareLoop() {};
|