From 944e93413116f5cfbe3e77dcce54b256d61bd0ad Mon Sep 17 00:00:00 2001 From: Alexandre B Date: Sat, 10 Aug 2024 16:33:27 -0400 Subject: [PATCH] . --- ESP32-Rainmaker-Switch/main/Kconfig.projbuild | 16 ++++++++-------- ESP32-Rainmaker-Switch/main/app_driver.c | 4 ++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ESP32-Rainmaker-Switch/main/Kconfig.projbuild b/ESP32-Rainmaker-Switch/main/Kconfig.projbuild index 2b34decf..b63b6da1 100644 --- a/ESP32-Rainmaker-Switch/main/Kconfig.projbuild +++ b/ESP32-Rainmaker-Switch/main/Kconfig.projbuild @@ -1,4 +1,4 @@ -menu "Rainmaker ESP32C3 Smart Switch" +menu "Rainmaker ESP32C3 Switch" config EXAMPLE_BOARD_BUTTON_GPIO int "Boot Button GPIO" @@ -16,18 +16,18 @@ menu "Rainmaker ESP32C3 Smart Switch" push button will trigger a parameter notification {"Switch":{"Power":true}} and turning off will trigger an alert "Switch was turned off". - config LED_RIGHT_GPIO + config EXAMPLE_OUTPUT_GPIO int "Output GPIO" - default 12 + default 19 help - This is an output GPIO that is connected to an on-board LED located on a right side to the USB-C port. + This is an output GPIO that will be connected to a relay or other driver circuit in most cases. If the power changes, this GPIO output level will also change. - - config LED_LEFT_GPIO + + config SWITCH_LED_1 int "Output GPIO" - default 13 + default 19 help - This is an output GPIO that is connected to an on-board LED located on a right side to the USB-C port. + This is an output GPIO that will be connected to a relay or other driver circuit in most cases. If the power changes, this GPIO output level will also change. endmenu diff --git a/ESP32-Rainmaker-Switch/main/app_driver.c b/ESP32-Rainmaker-Switch/main/app_driver.c index f281dc88..e5562467 100644 --- a/ESP32-Rainmaker-Switch/main/app_driver.c +++ b/ESP32-Rainmaker-Switch/main/app_driver.c @@ -23,6 +23,10 @@ /* This is the GPIO on which the power will be set */ #define OUTPUT_GPIO CONFIG_EXAMPLE_OUTPUT_GPIO + +#define SYS_LED_1 CONFIG_SWITCH +#define SYS_LED_2 + static bool g_power_state = DEFAULT_POWER; /* These values correspoind to H,S,V = 120,100,10 */