Browse Source

Add support for ESPURNA_H board

fastled
Xose Pérez 7 years ago
parent
commit
325d5f9c7a
3 changed files with 36 additions and 0 deletions
  1. +17
    -0
      code/espurna/config/hardware.h
  2. +10
    -0
      code/espurna/hardware.ino
  3. +9
    -0
      code/platformio.ini

+ 17
- 0
code/espurna/config/hardware.h View File

@ -44,6 +44,23 @@
#define LED1_PIN 2 #define LED1_PIN 2
#define LED1_PIN_INVERSE 1 #define LED1_PIN_INVERSE 1
// -----------------------------------------------------------------------------
// ESPurna
// -----------------------------------------------------------------------------
#elif defined(ESPURNA_H)
#define MANUFACTURER "TINKERMAN"
#define DEVICE "ESPURNA_H"
#define RELAY1_PIN 12
#define RELAY1_PIN_INVERSE 1
#define LED1_PIN 5
#define LED1_PIN_INVERSE 0
#define BUTTON1_PIN 4
#define BUTTON1_RELAY 1
#define BUTTON1_MODE BUTTON_SWITCH
#define ENABLE_POW 1
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Itead Studio boards // Itead Studio boards
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------


+ 10
- 0
code/espurna/hardware.ino View File

@ -254,6 +254,16 @@ void hwUpwardsCompatibility() {
setSetting("relayLogic", 1, 0); setSetting("relayLogic", 1, 0);
#endif #endif
#if ESPURNA_H
setSetting("board", 23);
setSetting("ledGPIO", 1, 5);
setSetting("ledLogic", 1, 0);
setSetting("btnGPIO", 1, 4);
setSetting("btnRelay", 1, 1);
setSetting("relayGPIO", 1, 12);
setSetting("relayLogic", 1, 1);
#endif
saveSettings(); saveSettings();
} }

+ 9
- 0
code/platformio.ini View File

@ -82,6 +82,15 @@ upload_speed = 115200
upload_port = "192.168.4.1" upload_port = "192.168.4.1"
upload_flags = --auth=fibonacci --port 8266 upload_flags = --auth=fibonacci --port 8266
[env:espurna-debug]
platform = espressif8266
framework = arduino
board = esp12e
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
extra_script = pio_hooks.py
build_flags = ${common.build_flags} -DESPURNA_H
[env:sonoff-debug] [env:sonoff-debug]
platform = espressif8266 platform = espressif8266
framework = arduino framework = arduino


Loading…
Cancel
Save