From 4d5b6ec83a6c30154fb9aed1d6518cfc8b81339f Mon Sep 17 00:00:00 2001 From: Indu Prakash Date: Sat, 22 Sep 2018 09:32:45 -0500 Subject: [PATCH] Added BESTEK_MRJ1011 --- code/espurna/config/hardware.h | 24 ++++++++++++++++++++++++ code/platformio.ini | 25 +++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 256a0f11..e8f6d315 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -2790,6 +2790,30 @@ #define LIGHT_CH3_INVERSE 0 #define LIGHT_CH4_INVERSE 0 +// ----------------------------------------------------------------------------- +// Bestek Smart Plug with 2 USB ports +// https://www.bestekcorp.com/bestek-smart-plug-works-with-amazon-alexa-google-assistant-and-ifttt-with-2-usb +// ----------------------------------------------------------------------------- + +#elif defined(BESTEK_MRJ1011) + + // Info + #define MANUFACTURER "BESTEK" + #define DEVICE "MRJ1011" + + // Buttons + #define BUTTON1_PIN 13 + #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH + #define BUTTON1_RELAY 1 + + // Relay + #define RELAY1_PIN 12 + #define RELAY1_TYPE RELAY_TYPE_NORMAL + + // LED + #define LED1_PIN 4 + #define LED1_PIN_INVERSE 1 + // ----------------------------------------------------------------------------- // TEST boards (do not use!!) // ----------------------------------------------------------------------------- diff --git a/code/platformio.ini b/code/platformio.ini index d00c48d1..e6ab1152 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -2677,3 +2677,28 @@ upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} + +[env:bestek-mrj1011] +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} -DBESTEK_MRJ1011 +monitor_speed = ${common.monitor_speed} +extra_scripts = ${common.extra_scripts} + +[env:bestek-mrj1011-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} -DBESTEK_MRJ1011 +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}