Browse Source

Support for GBLife RGBW Socket (#1305)

alexa
Xose Pérez 6 years ago
parent
commit
7e23c22351
3 changed files with 61 additions and 0 deletions
  1. +1
    -0
      code/espurna/config/arduino.h
  2. +34
    -0
      code/espurna/config/hardware.h
  3. +26
    -0
      code/platformio.ini

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

@ -107,6 +107,7 @@
//#define LOMBEX_LUX_NOVA2_WHITE_COLOR
//#define MAGICHOME_ZJ_WFMN_A_11
//#define MAGICHOME_ZJ_WFMN_B_11
//#define GBLIFE_RGBW_SOCKET
//--------------------------------------------------------------------------------
// Features (values below are non-default values)


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

@ -3114,6 +3114,40 @@
#define LED1_PIN 4
#define LED1_PIN_INVERSE 1
// -----------------------------------------------------------------------------
// GBLIFE RGBW SOCKET
// -----------------------------------------------------------------------------
#elif defined(GBLIFE_RGBW_SOCKET)
// Info
#define MANUFACTURER "GBLIFE"
#define DEVICE "RGBW_SOCKET"
// Buttons
#define BUTTON1_PIN 13
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 2
// Relays
#define RELAY2_PIN 15
#define RELAY2_TYPE RELAY_TYPE_NORMAL
// Light RGBW
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
#define DUMMY_RELAY_COUNT 1
#define LIGHT_CHANNELS 4
#define LIGHT_CH1_PIN 5 // RED
#define LIGHT_CH2_PIN 14 // GREEN
#define LIGHT_CH3_PIN 12 // BLUE
#define LIGHT_CH4_PIN 4 // WHITE
#define LIGHT_CH1_INVERSE 0
#define LIGHT_CH2_INVERSE 0
#define LIGHT_CH3_INVERSE 0
#define LIGHT_CH4_INVERSE 0
// -----------------------------------------------------------------------------
// TEST boards (do not use!!)
// -----------------------------------------------------------------------------


+ 26
- 0
code/platformio.ini View File

@ -2928,3 +2928,29 @@ upload_port = ${common.upload_port}
upload_flags = ${common.upload_flags}
monitor_speed = ${common.monitor_speed}
extra_scripts = ${common.extra_scripts}
[env:gblife-rgbw-socket]
platform = ${common.platform}
framework = ${common.framework}
board = ${common.board_1m}
board_build.flash_mode = ${common.flash_mode}
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m0m} -DGBLIFE_RGBW_SOCKET
monitor_speed = ${common.monitor_speed}
extra_scripts = ${common.extra_scripts}
[env:gblife-rgbw-socket-ota]
platform = ${common.platform}
framework = ${common.framework}
board = ${common.board_1m}
board_build.flash_mode = ${common.flash_mode}
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m0m} -DGBLIFE_RGBW_SOCKET
upload_speed = ${common.upload_speed}
upload_port = ${common.upload_port}
upload_flags = ${common.upload_flags}
monitor_speed = ${common.monitor_speed}
extra_scripts = ${common.extra_scripts}

Loading…
Cancel
Save