Browse Source

new board ESP_DIN

rfm69
Pavel Slama 6 years ago
parent
commit
9018077e9a
4 changed files with 77 additions and 0 deletions
  1. +1
    -0
      code/espurna/config/arduino.h
  2. +40
    -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

@ -77,6 +77,7 @@
//#define GENERIC_ESP01S_DHT11_V10 //#define GENERIC_ESP01S_DHT11_V10
//#define GENERIC_ESP01S_DS18B20_V10 //#define GENERIC_ESP01S_DS18B20_V10
//#define HELTEC_TOUCHRELAY //#define HELTEC_TOUCHRELAY
//#define PILOTAK_ESP_DIN_V1
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// Features (values below are non-default values) // Features (values below are non-default values)


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

@ -1902,6 +1902,46 @@
#endif #endif
#define DALLAS_PIN 2 #define DALLAS_PIN 2
// -----------------------------------------------------------------------------
// ESP-01S DS18B20 v1.0
// 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 16
#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
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Heltec Touch Relay // Heltec Touch Relay
// https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180408043114&SearchText=esp8266+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

@ -888,6 +888,18 @@ void migrate() {
setSetting("board", 69); setSetting("board", 69);
#elif defined(PILOTAK_ESP_DIN_V1)
setSetting("board", 70);
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);
#else #else
// Allow users to define new settings without migration config // Allow users to define new settings without migration config


+ 24
- 0
code/platformio.ini View File

@ -1993,3 +1993,27 @@ upload_speed = 115200
upload_port = "${env.ESPURNA_IP}" upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266 upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
extra_scripts = ${common.extra_scripts} 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