Browse Source

add new "magichome-led-controller-ir" with changed GPIO order

fastled
soif 7 years ago
parent
commit
d88cb2f3e4
4 changed files with 70 additions and 0 deletions
  1. +1
    -0
      code/espurna/config/arduino.h
  2. +29
    -0
      code/espurna/config/hardware.h
  3. +17
    -0
      code/espurna/hardware.ino
  4. +23
    -0
      code/platformio.ini

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

@ -34,6 +34,7 @@
//#define WORKCHOICE_ECOPLUG //#define WORKCHOICE_ECOPLUG
//#define AITHINKER_AI_LIGHT //#define AITHINKER_AI_LIGHT
//#define MAGICHOME_LED_CONTROLLER //#define MAGICHOME_LED_CONTROLLER
//#define MAGICHOME_LED_CONTROLLER_IR
//#define HUACANXING_H801 //#define HUACANXING_H801
//#define JANGOE_WIFI_RELAY_NC //#define JANGOE_WIFI_RELAY_NC
//#define JANGOE_WIFI_RELAY_NO //#define JANGOE_WIFI_RELAY_NO


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

@ -647,6 +647,35 @@
#define LIGHT_CH3_INVERSE 0 #define LIGHT_CH3_INVERSE 0
#define LIGHT_CH4_INVERSE 0 #define LIGHT_CH4_INVERSE 0
// -----------------------------------------------------------------------------
// LED Controller With IR
// -----------------------------------------------------------------------------
#elif defined(MAGICHOME_LED_CONTROLLER_IR)
// Info
#define MANUFACTURER "MAGICHOME"
#define DEVICE "LED_CONTROLLER_IR"
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
#define DUMMY_RELAY_COUNT 1
// LEDs
#define LED1_PIN 2
#define LED1_PIN_INVERSE 1
// Channels
#define LIGHT_CH1_PIN 5 // RED
#define LIGHT_CH2_PIN 12 // GREEN
#define LIGHT_CH3_PIN 13 // BLUE
//#define LIGHT_CH4_PIN 13 // WHITE
#define LIGHT_IR_PIN 14 // IR LED ?
#define LIGHT_CH1_INVERSE 0
#define LIGHT_CH2_INVERSE 0
#define LIGHT_CH3_INVERSE 0
#define LIGHT_CH4_INVERSE 0
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// HUACANXING H801 // HUACANXING H801
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------


+ 17
- 0
code/espurna/hardware.ino View File

@ -242,6 +242,23 @@ void hwUpwardsCompatibility() {
setSetting("chLogic", 4, 0); setSetting("chLogic", 4, 0);
setSetting("relays", 1); setSetting("relays", 1);
#elif defined(MAGICHOME_LED_CONTROLLER_IR)
setSetting("board", 21);
setSetting("relayProvider", RELAY_PROVIDER_LIGHT);
setSetting("lightProvider", LIGHT_PROVIDER_DIMMER);
setSetting("ledGPIO", 1, 2);
setSetting("ledLogic", 1, 1);
setSetting("chGPIO", 1, 5);
setSetting("chGPIO", 2, 12);
setSetting("chGPIO", 3, 13);
setSetting("chGPIO", 4, 14);
setSetting("chLogic", 1, 0);
setSetting("chLogic", 2, 0);
setSetting("chLogic", 3, 0);
setSetting("chLogic", 4, 0);
setSetting("relays", 1);
#elif defined(ITEAD_MOTOR) #elif defined(ITEAD_MOTOR)
setSetting("board", 22); setSetting("board", 22);


+ 23
- 0
code/platformio.ini View File

@ -703,6 +703,29 @@ 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:magichome-led-controller-ir]
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} -DMAGICHOME_LED_CONTROLLER_IR
monitor_baud = 115200
[env:magichome-led-controller-ir-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} -DMAGICHOME_LED_CONTROLLER_IR
upload_speed = 115200
upload_port = "192.168.4.1"
upload_flags = --auth=fibonacci --port 8266
monitor_baud = 115200
[env:huacanxing-h801] [env:huacanxing-h801]
platform = espressif8266 platform = espressif8266
framework = arduino framework = arduino


Loading…
Cancel
Save