Browse Source

Merge pull request #786 from pilotak/ESP_DIN

new board ESP_DIN_V1
rfm69
Xose Pérez 6 years ago
committed by GitHub
parent
commit
32a478945e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 83 additions and 0 deletions
  1. +1
    -0
      code/espurna/config/arduino.h
  2. +46
    -0
      code/espurna/config/hardware.h
  3. +12
    -0
      code/espurna/migrate.ino
  4. +24
    -0
      code/platformio.ini

+ 1
- 0
code/espurna/config/arduino.h View File

@ -84,6 +84,7 @@
//#define TONBUX_MOSQUITO_KILLER
//#define NEO_COOLCAM_POWER_PLUG_WIFI
//#define ESTINK_WIFI_POWER_STRIP
//#define PILOTAK_ESP_DIN_V1
//--------------------------------------------------------------------------------
// Features (values below are non-default values)


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

@ -1945,6 +1945,52 @@
#endif
#define DALLAS_PIN 2
// -----------------------------------------------------------------------------
// ESP-DIN relay board V1
// https://github.com/pilotak/esp_din
// -----------------------------------------------------------------------------
#elif defined(PILOTAK_ESP_DIN_V1)
// Info
#define MANUFACTURER "PILOTAK"
#define DEVICE "ESP_DIN_V1"
// Buttons
#define BUTTON1_PIN 0
#define BUTTON1_RELAY 1
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
// Relays
#define RELAY1_PIN 4
#define RELAY1_TYPE RELAY_TYPE_NORMAL
#define RELAY2_PIN 5
#define RELAY2_TYPE RELAY_TYPE_NORMAL
// LEDs
#define LED1_PIN 15
#define LED1_PIN_INVERSE 0
#define I2C_SDA_PIN 12
#define I2C_SCL_PIN 13
#ifndef DALLAS_SUPPORT
#define DALLAS_SUPPORT 1
#endif
#define DALLAS_PIN 2
#ifndef RF_SUPPORT
#define RF_SUPPORT 1
#endif
#define RF_PIN 14
#ifndef DIGITAL_SUPPORT
#define DIGITAL_SUPPORT 1
#endif
#define DIGITAL_PIN 16
#define DIGITAL_PIN_MODE INPUT
// -----------------------------------------------------------------------------
// Heltec Touch Relay
// https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180408043114&SearchText=esp8266+touch+relay


+ 12
- 0
code/espurna/migrate.ino View File

@ -962,6 +962,18 @@ void migrate() {
setSetting("btnRelay", 0, 0);
setSetting("relayGPIO", 0, 12);
setSetting("relayType", 0, RELAY_TYPE_NORMAL);
#elif defined(PILOTAK_ESP_DIN_V1)
setSetting("board", 76);
setSetting("ledGPIO", 0, 16);
setSetting("ledLogic", 0, 0);
setSetting("btnGPIO", 0, 0);
setSetting("btnRelay", 0, 0);
setSetting("relayGPIO", 0, 4);
setSetting("relayGPIO", 1, 5);
setSetting("relayType", 0, RELAY_TYPE_NORMAL);
setSetting("relayType", 1, RELAY_TYPE_NORMAL);
#elif defined(ESTINK_WIFI_POWER_STRIP)


+ 24
- 0
code/platformio.ini View File

@ -2200,3 +2200,27 @@ upload_speed = 115200
upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
extra_scripts = ${common.extra_scripts}
[env:pilotak-esp-din-v1]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DPILOTAK_ESP_DIN_V1
monitor_baud = 115200
extra_scripts = ${common.extra_scripts}
[env:pilotak-esp-din-v1-ota]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DPILOTAK_ESP_DIN_V1
upload_speed = 115200
upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
extra_scripts = ${common.extra_scripts}

Loading…
Cancel
Save