Skip to content

Commit

Permalink
Update arduino.h and platformio.ini (xoseperez#1774)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcspr committed Jun 23, 2019
1 parent 0dbfce1 commit 7539057
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 30 deletions.
1 change: 1 addition & 0 deletions code/espurna/config/arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
//#define IWOOLE_LED_TABLE_LAMP
//#define JANGOE_WIFI_RELAY_NC
//#define JANGOE_WIFI_RELAY_NO
//#define JINVOO_VALVE_SM_AW713
//#define JORGEGARCIA_WIFI_RELAYS
//#define KMC_70011
//#define LINGAN_SWA1
Expand Down
60 changes: 30 additions & 30 deletions code/espurna/config/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -3577,6 +3577,36 @@
#define LDR_ON_GROUND false
#define LDR_RESISTOR 10000

#elif defined(JINVOO_VALVE_SM_AW713)

// Reflashing from original Tuya firmware
// to thirdparty firmware like espurna by:
// https://github.com/ct-Open-Source/tuya-convert

// Info
#define MANUFACTURER "JINVOO"
#define DEVICE "VALVE_SM_AW713"

// Buttons
#define BUTTON1_PIN 13
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1

// Relays
#define RELAY1_PIN 12
#define RELAY1_TYPE RELAY_TYPE_NORMAL

// LED
#define LED1_PIN 5 // 5 red led
#define LED1_PIN_INVERSE 0
#define LED1_RELAY 1
#define LED1_MODE LED_MODE_RELAY

#define LED2_PIN 4 // 4 blue led
#define LED2_PIN_INVERSE 0
#define LED2_RELAY 1
#define LED2_MODE LED_MODE_FINDME_WIFI

// -----------------------------------------------------------------------------
// TEST boards (do not use!!)
// -----------------------------------------------------------------------------
Expand Down Expand Up @@ -3781,36 +3811,6 @@
#define SSDP_SUPPORT 1
#define RF_SUPPORT 1

#elif defined(JINVOO_VALVE_SM_AW713)

// Reflashing from original Tuya firmware
// to thirdparty firmware like espurna by:
// https://github.com/ct-Open-Source/tuya-convert

// Info
#define MANUFACTURER "JINVOO"
#define DEVICE "VALVE_SM_AW713"

// Buttons
#define BUTTON1_PIN 13
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1

// Relays
#define RELAY1_PIN 12
#define RELAY1_TYPE RELAY_TYPE_NORMAL

// LED
#define LED1_PIN 5 // 5 red led
#define LED1_PIN_INVERSE 0
#define LED1_RELAY 1
#define LED1_MODE LED_MODE_RELAY

#define LED2_PIN 4 // 4 blue led
#define LED2_PIN_INVERSE 0
#define LED2_RELAY 1
#define LED2_MODE LED_MODE_FINDME_WIFI

#endif

// -----------------------------------------------------------------------------
Expand Down
25 changes: 25 additions & 0 deletions code/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3399,3 +3399,28 @@ upload_port = ${common.upload_port}
upload_flags = ${common.upload_flags}
monitor_speed = ${common.monitor_speed}
extra_scripts = ${common.extra_scripts}

[env:jinvoo-valve-sm-aw713]
platform = ${common.platform}
framework = ${common.framework}
board = ${common.board_1m}
board_build.flash_mode = ${common.flash_mode}
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m0m} -DJINVOO_VALVE_SM_AW713
monitor_speed = ${common.monitor_speed}
extra_scripts = ${common.extra_scripts}

[env:jinvoo-valve-sm-aw713-ota]
platform = ${common.platform}
framework = ${common.framework}
board = ${common.board_1m}
board_build.flash_mode = ${common.flash_mode}
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m0m} -DJINVOO_VALVE_SM_AW713
upload_speed = ${common.upload_speed}
upload_port = ${common.upload_port}
upload_flags = ${common.upload_flags}
monitor_speed = ${common.monitor_speed}
extra_scripts = ${common.extra_scripts}

0 comments on commit 7539057

Please sign in to comment.