Skip to content

Commit

Permalink
Merged in ColinShorts/espurna-colinshorts/dev (pull request #35)
Browse files Browse the repository at this point in the history
Support for QuinLED 2.6

Approved-by: Xose Pérez <[email protected]>
  • Loading branch information
ColinShorts authored and xoseperez committed Oct 17, 2017
2 parents 67335e6 + 924289b commit 7b4866a
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/espurna/config/arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
//#define JORGEGARCIA_WIFI_RELAYS
//#define OPENENERGYMONITOR_MQTT_RELAY
//#define HUACANXING_H802
//#define QUINLED

//--------------------------------------------------------------------------------
// Features (values below are non-default values)
Expand Down
24 changes: 24 additions & 0 deletions code/espurna/config/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
// -----------------------------------------------------------------------------
Expand Down
13 changes: 13 additions & 0 deletions code/espurna/hardware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand Down
23 changes: 23 additions & 0 deletions code/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
# ------------------------------------------------------------------------------
Expand Down

0 comments on commit 7b4866a

Please sign in to comment.