From df9fa1d424a1ca7619ca5d6bb97888a127d139f6 Mon Sep 17 00:00:00 2001 From: Colin Shorts Date: Mon, 16 Oct 2017 17:33:20 +0100 Subject: [PATCH 1/2] Initial support for QuinLED 2.6 Rev1.00 --- code/espurna/config/arduino.h | 1 + code/espurna/config/hardware.h | 24 ++++++++++++++++++++++++ code/espurna/hardware.ino | 13 +++++++++++++ 3 files changed, 38 insertions(+) diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index 3fdd0451..3ce01236 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -40,6 +40,7 @@ //#define JORGEGARCIA_WIFI_RELAYS //#define OPENENERGYMONITOR_MQTT_RELAY //#define HUACANXING_H802 +//#define QUINLED //-------------------------------------------------------------------------------- // Features (values below are non-default values) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index e9034066..947b4e31 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -957,6 +957,30 @@ #define DS18B20_UPDATE_INTERVAL 5000 #define DS18B20_UPDATE_ON_CHANGE 1.0 +// QuinLED +// - http://blog.quindorian.org/2017/02/esp8266-led-lighting-quinled-v2-6-pcb.html/ +// ----------------------------------------------------------------------------- + +#elif defined(QUINLED) + + // Info + #define MANUFACTURER "INTERMIT.TECH" + #define DEVICE "QUINLED" + #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT + #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER + #define DUMMY_RELAY_COUNT 1 + + // LEDs + #define LED1_PIN 5 + #define LED1_PIN_INVERSE 1 + + // Channels + #define LIGHT_CH1_PIN 0 + #define LIGHT_CH2_PIN 2 + + #define LIGHT_CH1_INVERSE 0 + #define LIGHT_CH2_INVERSE 0 + // ----------------------------------------------------------------------------- // Unknown hardware // ----------------------------------------------------------------------------- diff --git a/code/espurna/hardware.ino b/code/espurna/hardware.ino index 1fa405d4..a789f4f8 100644 --- a/code/espurna/hardware.ino +++ b/code/espurna/hardware.ino @@ -467,6 +467,19 @@ void hwUpwardsCompatibility() { setSetting("relayType", 1, RELAY_TYPE_NORMAL); setSetting("relayType", 2, RELAY_TYPE_NORMAL); + #elif defined(QUINLED) + + setSetting("board", 41); + setSetting("relayProvider", RELAY_PROVIDER_LIGHT); + setSetting("lightProvider", LIGHT_PROVIDER_DIMMER); + setSetting("ledGPIO", 1, 1); + setSetting("ledLogic", 1, 1); + setSetting("chGPIO", 1, 0); + setSetting("chGPIO", 2, 2); + setSetting("chLogic", 1, 0); + setSetting("chLogic", 2, 0); + setSetting("relays", 1); + #else #error "UNSUPPORTED HARDWARE!" From 924289b6c9e22d2b1bd3f5b61442fb5885f3e13f Mon Sep 17 00:00:00 2001 From: Colin Shorts Date: Mon, 16 Oct 2017 17:48:16 +0100 Subject: [PATCH 2/2] Support for QuinLED 2.6 Rev1.00 --- code/platformio.ini | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/code/platformio.ini b/code/platformio.ini index 33fb1457..1d7032d0 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -930,6 +930,29 @@ upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 monitor_baud = 115200 +[env:quinled] +platform = espressif8266 +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} -DQUINLED +monitor_baud = 115200 + +[env:quinled-ota] +platform = espressif8266 +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} -DQUINLED +upload_speed = 115200 +upload_port = "192.168.4.1" +upload_flags = --auth=fibonacci --port 8266 +monitor_baud = 115200 + # ------------------------------------------------------------------------------ # GENERIC OTA ENVIRONMENTS # ------------------------------------------------------------------------------