Browse Source

Generic 8CH board

fastled
Xose Pérez 7 years ago
parent
commit
85366e91af
4 changed files with 59 additions and 0 deletions
  1. +1
    -0
      code/espurna/config/arduino.h
  2. +28
    -0
      code/espurna/config/hardware.h
  3. +20
    -0
      code/espurna/migrate.ino
  4. +10
    -0
      code/platformio.ini

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

@ -54,6 +54,7 @@
//#define ARILUX_E27 //#define ARILUX_E27
//#define XENON_SM_PW702U //#define XENON_SM_PW702U
//#define AUTHOMETION_LYT8266 //#define AUTHOMETION_LYT8266
//#define GENERIC_8CH
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// Features (values below are non-default values) // Features (values below are non-default values)


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

@ -1256,6 +1256,34 @@
#define LIGHT_ENABLE_PIN 15 #define LIGHT_ENABLE_PIN 15
// -----------------------------------------------------------------------------
// Generic 8CH
// -----------------------------------------------------------------------------
#elif defined(GENERIC_8CH)
// Info
#define MANUFACTURER "GENERIC"
#define DEVICE "8CH"
// Relays
#define RELAY1_PIN 0
#define RELAY1_TYPE RELAY_TYPE_NORMAL
#define RELAY2_PIN 2
#define RELAY2_TYPE RELAY_TYPE_NORMAL
#define RELAY3_PIN 4
#define RELAY3_TYPE RELAY_TYPE_NORMAL
#define RELAY4_PIN 5
#define RELAY4_TYPE RELAY_TYPE_NORMAL
#define RELAY5_PIN 12
#define RELAY5_TYPE RELAY_TYPE_NORMAL
#define RELAY6_PIN 13
#define RELAY6_TYPE RELAY_TYPE_NORMAL
#define RELAY7_PIN 14
#define RELAY7_TYPE RELAY_TYPE_NORMAL
#define RELAY8_PIN 15
#define RELAY8_TYPE RELAY_TYPE_NORMAL
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Unknown hardware // Unknown hardware
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------


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

@ -631,6 +631,26 @@ void migrate() {
setSetting("relayType", 0, RELAY_TYPE_NORMAL); setSetting("relayType", 0, RELAY_TYPE_NORMAL);
setSetting("relayType", 1, RELAY_TYPE_NORMAL); setSetting("relayType", 1, RELAY_TYPE_NORMAL);
#elif defined(GENERIC_8CH)
setSetting("board", 49);
setSetting("relayGPIO", 0, 0);
setSetting("relayGPIO", 1, 2);
setSetting("relayGPIO", 2, 4);
setSetting("relayGPIO", 3, 5);
setSetting("relayGPIO", 4, 12);
setSetting("relayGPIO", 5, 13);
setSetting("relayGPIO", 6, 14);
setSetting("relayGPIO", 7, 15);
setSetting("relayType", 0, RELAY_TYPE_NORMAL);
setSetting("relayType", 1, RELAY_TYPE_NORMAL);
setSetting("relayType", 2, RELAY_TYPE_NORMAL);
setSetting("relayType", 3, RELAY_TYPE_NORMAL);
setSetting("relayType", 4, RELAY_TYPE_NORMAL);
setSetting("relayType", 5, RELAY_TYPE_NORMAL);
setSetting("relayType", 6, RELAY_TYPE_NORMAL);
setSetting("relayType", 7, RELAY_TYPE_NORMAL);
#else #else
#error "UNSUPPORTED HARDWARE!" #error "UNSUPPORTED HARDWARE!"


+ 10
- 0
code/platformio.ini View File

@ -1158,6 +1158,16 @@ upload_port = "192.168.4.1"
upload_flags = --auth=fibonacci --port 8266 upload_flags = --auth=fibonacci --port 8266
monitor_baud = 115200 monitor_baud = 115200
[env:generic-8ch]
platform = ${common.platform}
framework = arduino
board = d1_mini
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags} -DGENERIC_8CH
upload_speed = 460800
monitor_baud = 115200
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# GENERIC OTA ENVIRONMENTS # GENERIC OTA ENVIRONMENTS
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------


Loading…
Cancel
Save