diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 372f6e0b..93c58d62 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -1,4 +1,4 @@ -// ----------------------------------------------------------------------------- + // ----------------------------------------------------------------------------- // Configuration HELP // ----------------------------------------------------------------------------- // @@ -1066,8 +1066,9 @@ #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/ +// http://blog.quindorian.org/2017/02/esp8266-led-lighting-quinled-v2-6-pcb.html // ----------------------------------------------------------------------------- #elif defined(INTERMITTECH_QUINLED) @@ -1090,6 +1091,32 @@ #define LIGHT_CH1_INVERSE 0 #define LIGHT_CH2_INVERSE 0 +// ----------------------------------------------------------------------------- +// Arilux AL-LC06 +// ----------------------------------------------------------------------------- + +#elif defined(ARILUX_AL_LC06) + + // Info + #define MANUFACTURER "ARILUX" + #define DEVICE "AL-LC06" + #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT + #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER + #define DUMMY_RELAY_COUNT 1 + + // Channels + #define LIGHT_CH1_PIN 12 // RED + #define LIGHT_CH2_PIN 14 // GREEN + #define LIGHT_CH3_PIN 13 // BLUE + #define LIGHT_CH4_PIN 15 // WHITE1 + #define LIGHT_CH5_PIN 5 // WHITE2 + + #define LIGHT_CH1_INVERSE 0 + #define LIGHT_CH2_INVERSE 0 + #define LIGHT_CH3_INVERSE 0 + #define LIGHT_CH4_INVERSE 0 + #define LIGHT_CH5_INVERSE 0 + // ----------------------------------------------------------------------------- // Unknown hardware // ----------------------------------------------------------------------------- diff --git a/code/espurna/hardware.ino b/code/espurna/hardware.ino index 427a9301..4c865db9 100644 --- a/code/espurna/hardware.ino +++ b/code/espurna/hardware.ino @@ -514,6 +514,23 @@ void hwUpwardsCompatibility() { setSetting("chLogic", 4, 0); setSetting("relays", 1); + #elif defined(ARILUX_AL_LC06) + + setSetting("board", 43); + setSetting("relayProvider", RELAY_PROVIDER_LIGHT); + setSetting("lightProvider", LIGHT_PROVIDER_DIMMER); + setSetting("chGPIO", 1, 12); + setSetting("chGPIO", 2, 14); + setSetting("chGPIO", 3, 13); + setSetting("chGPIO", 4, 15); + setSetting("chGPIO", 5, 5); + setSetting("chLogic", 1, 0); + setSetting("chLogic", 2, 0); + setSetting("chLogic", 3, 0); + setSetting("chLogic", 4, 0); + setSetting("chLogic", 5, 0); + setSetting("relays", 1); + #else #error "UNSUPPORTED HARDWARE!" diff --git a/code/platformio.ini b/code/platformio.ini index 633c73da..0931adc1 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -798,6 +798,29 @@ upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 monitor_baud = 115200 +[env:arilux-al-lc06] +platform = ${common.platform} +framework = arduino +board = esp01_1m +board_flash_mode = dout +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DARILUX_AL_LC06 +monitor_baud = 115200 + +[env:arilux-al-lc06-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 = -g -Wl,-Tesp8266.flash.1m0.ld -DARILUX_AL_LC06 +upload_speed = 115200 +upload_port = "192.168.4.1" +upload_flags = --auth=fibonacci --port 8266 +monitor_baud = 115200 + [env:itead-bnsz01] platform = ${common.platform} framework = arduino