Browse Source

feat: add support GizWits Witty Cloud

rfm69
theonedemon 6 years ago
parent
commit
81abe3d494
3 changed files with 59 additions and 0 deletions
  1. +2
    -0
      code/espurna/config/arduino.h
  2. +33
    -0
      code/espurna/config/hardware.h
  3. +24
    -0
      code/platformio.ini

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

@ -60,6 +60,7 @@
//#define ARILUX_AL_LC02 //#define ARILUX_AL_LC02
//#define WEMOS_D1_TARPUNA_SHIELD //#define WEMOS_D1_TARPUNA_SHIELD
//#define MAGICHOME_LED_CONTROLLER_23 //#define MAGICHOME_LED_CONTROLLER_23
//#define GIZWITS_WITTY_CLOUD
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// Features (values below are non-default values) // Features (values below are non-default values)
@ -96,6 +97,7 @@
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
//#define ANALOG_SUPPORT 1 //#define ANALOG_SUPPORT 1
//#define GL55XX_SUPPORT 1
//#define BH1750_SUPPORT 1 //#define BH1750_SUPPORT 1
//#define BMX280_SUPPORT 1 //#define BMX280_SUPPORT 1
//#define DALLAS_SUPPORT 1 //#define DALLAS_SUPPORT 1


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

@ -1393,6 +1393,39 @@
#define LIGHT_ENABLE_PIN 15 #define LIGHT_ENABLE_PIN 15
#elif defined(GIZWITS_WITTY_CLOUD)
// Info
#define MANUFACTURER "GIZWITS"
#define DEVICE "WITTY_CLOUD"
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
#define DUMMY_RELAY_COUNT 1
// Buttons
#define BUTTON1_PIN 4
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON1_PRESS BUTTON_MODE_TOGGLE
#define BUTTON1_CLICK BUTTON_MODE_NONE
#define BUTTON1_DBLCLICK BUTTON_MODE_NONE
#define BUTTON1_LNGCLICK BUTTON_MODE_NONE
#define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET
#define ANALOG_SUPPORT 1
// LEDs
#define LED1_PIN 2 // BLUE build-in
#define LED1_PIN_INVERSE 1
// Light
#define LIGHT_CHANNELS 3
#define LIGHT_CH1_PIN 15 // RED
#define LIGHT_CH2_PIN 12 // GREEN
#define LIGHT_CH3_PIN 13 // BLUE
#define LIGHT_CH1_INVERSE 0
#define LIGHT_CH2_INVERSE 0
#define LIGHT_CH3_INVERSE 0
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Generic 8CH // Generic 8CH
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------


+ 24
- 0
code/platformio.ini View File

@ -1411,6 +1411,30 @@ upload_speed = 460800
monitor_baud = 115200 monitor_baud = 115200
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
[env:gizwits-witty-cloud]
platform = ${common.platform}
framework = arduino
board = esp12e
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags} -DGIZWITS_WITTY_CLOUD
monitor_baud = 115200
extra_scripts = ${common.extra_scripts}
[env:gizwits-witty-cloud-ota]
platform = ${common.platform}
framework = arduino
board = esp12e
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags} -DGIZWITS_WITTY_CLOUD
upload_speed = 115200
upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
extra_scripts = ${common.extra_scripts}
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# GENERIC OTA ENVIRONMENTS # GENERIC OTA ENVIRONMENTS
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------


Loading…
Cancel
Save