From cdc98e1cb54253e742160c9b0112b5a36c6c6106 Mon Sep 17 00:00:00 2001 From: "Mitchell A. Cox" Date: Sun, 8 Oct 2017 14:42:11 +0200 Subject: [PATCH] Added ESPLive board --- code/espurna/config/hardware.h | 28 ++++++++++++++++++++++++++++ code/espurna/hardware.ino | 12 ++++++++++++ 2 files changed, 40 insertions(+) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index fe35cd67..5b64f19a 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -876,6 +876,34 @@ #define ECH1560_MISO_PIN 5 #define ECH1560_INVERTED 0 +// ----------------------------------------------------------------------------- +// ESPLive +// https://github.com/ManCaveMade/ESP-Live +// ----------------------------------------------------------------------------- + +#elif defined(ESPLIVE) + + // Info + #define MANUFACTURER "ManCave Made" + #define DEVICE "ESPLIVE" + + // Buttons + #define BUTTON1_PIN 4 + #define BUTTON2_PIN 5 + + #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH + #define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH + + #define BUTTON1_RELAY 1 + #define BUTTON2_RELAY 2 + + // Relays + #define RELAY1_PIN 12 + #define RELAY2_PIN 13 + + #define RELAY1_TYPE RELAY_TYPE_NORMAL + #define RELAY2_TYPE RELAY_TYPE_NORMAL + // ----------------------------------------------------------------------------- // Unknown hardware // ----------------------------------------------------------------------------- diff --git a/code/espurna/hardware.ino b/code/espurna/hardware.ino index d11f6a7d..7ede77d7 100644 --- a/code/espurna/hardware.ino +++ b/code/espurna/hardware.ino @@ -442,6 +442,18 @@ void hwUpwardsCompatibility() { setSetting("board", 38); + #elif defined(ESPLIVE) + + setSetting("board", 39); + setSetting("btnGPIO", 1, 4); + setSetting("btnGPIO", 2, 5); + setSetting("btnRelay", 1, 1); + setSetting("btnRelay", 2, 2); + setSetting("relayGPIO", 1, 12); + setSetting("relayGPIO", 2, 13); + setSetting("relayType", 1, RELAY_TYPE_NORMAL); + setSetting("relayType", 2, RELAY_TYPE_NORMAL); + #else #error "UNSUPPORTED HARDWARE!"