diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 947b4e31..03406e76 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -49,7 +49,11 @@ #define DEVICE "D1_MINI_RELAYSHIELD" // Buttons - // No buttons on the D1 MINI + // No buttons on the D1 MINI alone, but defining it without adding a button doen't create problems + #define BUTTON1_PIN 0 // Connect a pushbutton between D3 and GND, + // it's the same as using a Wemos one button shield + #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH + #define BUTTON1_RELAY 1 // Relays #define RELAY1_PIN 5 @@ -59,6 +63,13 @@ #define LED1_PIN 2 #define LED1_PIN_INVERSE 1 + // Buttons + // No buttons on the D1 MINI alone, but defining it without adding a button doen't create problems + #define BUTTON1_PIN 0 // Connect a pushbutton between D3 and GND, + // it's the same as using a Wemos one button shield + #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH + #define BUTTON1_RELAY 1 + // ----------------------------------------------------------------------------- // ESPurna // ----------------------------------------------------------------------------- diff --git a/code/espurna/hardware.ino b/code/espurna/hardware.ino index a789f4f8..05d6e4d2 100644 --- a/code/espurna/hardware.ino +++ b/code/espurna/hardware.ino @@ -33,6 +33,8 @@ void hwUpwardsCompatibility() { setSetting("board", 3); setSetting("ledGPIO", 1, 2); setSetting("ledLogic", 1, 1); + setSetting("btnGPIO", 1, 0); + setSetting("btnRelay", 1, 1); setSetting("relayGPIO", 1, 5); setSetting("relayType", 1, RELAY_TYPE_NORMAL);