From c37a1d28ee0c47213ebe08598439f8e76ecbdd7d Mon Sep 17 00:00:00 2001 From: Florian <1technophile@users.noreply.github.com> Date: Fri, 15 Feb 2019 20:58:40 +0100 Subject: [PATCH] Enable to switch HM1X led by a macro #357 if //#define HM_BLUE_LED_STOP true uncommented the HM1X led is off --- ZgatewayBT.ino | 4 ++++ config_BT.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ZgatewayBT.ino b/ZgatewayBT.ino index 3439317..c2203f3 100644 --- a/ZgatewayBT.ino +++ b/ZgatewayBT.ino @@ -197,6 +197,10 @@ Thanks to wolass https://github.com/wolass for suggesting me HM 10 and dinosd ht delay(100); softserial.print(F("AT+RESET")); delay(100); + #ifdef HM_BLUE_LED_STOP + softserial.print(F("AT+PIO11")); // When not connected (as in BLE mode) the LED is off. When connected the LED is solid on. + #endif + delay(100); trc(F("ZgatewayBT HM1X setup done ")); } diff --git a/config_BT.h b/config_BT.h index 06912b5..f89c46d 100644 --- a/config_BT.h +++ b/config_BT.h @@ -29,7 +29,7 @@ #define Scan_duration 10 //define the time for a scan #define HM-10 //#define HM-11 // uncomment this line if you use HM-11 and comment the line above -#define ZgatewayBT_v6xx // comment if you don't have a firmware version of HM10/11 >= v601 +//#define HM_BLUE_LED_STOP true //uncomment to stop the blue led light of HM1X #define delimiter "4f4b2b444953413a" #define delimiter_length 16 #define pubBLEServiceData true // comment if you don't want to publish service data (in case you are having too heavy service data) https://github.com/1technophile/OpenMQTTGateway/issues/318#issuecomment-446064707