[INDICATORS] Neopixel 2leds (#1596)
* Add Adafruit NeoPixel library #defines * Currently FastLED causes rapid reboots on ESP32C3 boards when OMG signals. Onboard RGB LEDs can be adressed more reliably with the NeoPixel library. Define RGB_INDICATORS=2 to use this addition. * rebase fix: adapt to "Bump ESP32" changes in development * Add build environments for the Espressiv ESP32-C3-DevKitC-02 board * esp32c3-dev-c2-ble and esp32c3-dev-c2-ble-no-serial environments both use the Adafruit NeoPixel library for the onboard RGB LED as FastLED causes rapid reboots. * Only occasional reboots of this board occure when serial output is not read. The -no-serial version further improves stability. * Add a build environment for the Espressiv ESP32-C3-DevKitC-02 board * The esp32c3-dev-c2-ble offers a reasonable compromise between logging and stability of OMG on this board.
This commit is contained in:
1 parent
38af4b86ca
commit
4f3bb432e5
3 files changed
+171
-102
No files matched your search
+66
-46
@@ -73,6 +73,7 @@ lib_deps =
|
||||
${libraries.tsl2561}
|
||||
${libraries.ina226}
|
||||
${libraries.fastled}
|
||||
${libraries.adafruit_neopixel}
|
||||
${libraries.onewire}
|
||||
${libraries.dallastemperature}
|
||||
${libraries.rfWeatherStation}
|
||||
@@ -584,7 +585,7 @@ lib_deps =
|
||||
${libraries.ble}
|
||||
${libraries.decoder}
|
||||
${libraries.irremoteesp}
|
||||
${libraries.fastled}
|
||||
${libraries.adafruit_neopixel}
|
||||
build_flags =
|
||||
${com-esp.build_flags}
|
||||
'-DZgatewayBT="BT"'
|
||||
@@ -592,9 +593,8 @@ build_flags =
|
||||
'-DTRIGGER_GPIO=39'
|
||||
'-DSLEEP_BUTTON=39'
|
||||
'-DIR_EMITTER_GPIO=12'
|
||||
'-DFASTLED_IND_DATA_GPIO=27,GRB'
|
||||
'-DFASTLED_IND_TYPE=WS2812'
|
||||
'-DFASTLED_IND_NUM_LEDS=25'
|
||||
'-DANEOPIX_IND_DATA_GPIO=27'
|
||||
'-DANEOPIX_IND_NUM_LEDS=25'
|
||||
'-DRGB_INDICATORS=true'
|
||||
'-DGateway_Name="OpenMQTTGateway_ATOM_M"'
|
||||
board_upload.speed = 1500000
|
||||
@@ -611,7 +611,7 @@ lib_deps =
|
||||
${libraries.ble}
|
||||
${libraries.decoder}
|
||||
${libraries.irremoteesp}
|
||||
${libraries.fastled}
|
||||
${libraries.adafruit_neopixel}
|
||||
build_flags =
|
||||
${com-esp.build_flags}
|
||||
'-DZgatewayBT="BT"'
|
||||
@@ -619,9 +619,8 @@ build_flags =
|
||||
'-DTRIGGER_GPIO=39'
|
||||
'-DSLEEP_BUTTON=39'
|
||||
'-DIR_EMITTER_GPIO=12'
|
||||
'-DFASTLED_IND_DATA_GPIO=27,GRB'
|
||||
'-DFASTLED_IND_TYPE=WS2812'
|
||||
'-DFASTLED_IND_NUM_LEDS=1'
|
||||
'-DANEOPIX_IND_DATA_GPIO=27'
|
||||
'-DANEOPIX_IND_NUM_LEDS=1'
|
||||
'-DRGB_INDICATORS=true'
|
||||
'-DGateway_Name="OpenMQTTGateway_ATOM_L"'
|
||||
board_upload.speed = 1500000
|
||||
@@ -895,16 +894,11 @@ lib_deps =
|
||||
${com-esp.lib_deps}
|
||||
${libraries.wifimanager32}
|
||||
${libraries.ble}
|
||||
${libraries.fastled}
|
||||
${libraries.decoder}
|
||||
build_flags =
|
||||
${com-esp.build_flags}
|
||||
'-DZgatewayBT="BT"'
|
||||
'-DGateway_Name="OpenMQTTGateway_ESP32_TINYPICO_BLE"'
|
||||
'-DRGB_LED_POWER=13'
|
||||
'-DFASTLED_IND_DATA_GPIO=2,12,RGB'
|
||||
'-DFASTLED_IND_TYPE=APA102'
|
||||
'-DFASTLED_IND_NUM_LEDS=1'
|
||||
board_build.flash_mode = dio
|
||||
custom_description = BLE gateway
|
||||
custom_hardware = ESP32 TinyPICO
|
||||
@@ -1520,13 +1514,12 @@ lib_deps =
|
||||
${libraries.wifimanager32}
|
||||
${libraries.ble}
|
||||
${libraries.decoder}
|
||||
${libraries.fastled}
|
||||
${libraries.adafruit_neopixel}
|
||||
build_flags =
|
||||
${com-esp.build_flags}
|
||||
'-DZgatewayBT="BT"'
|
||||
'-DFASTLED_IND_DATA_GPIO=48'
|
||||
'-DFASTLED_IND_TYPE=NEOPIXEL'
|
||||
'-DFASTLED_IND_NUM_LEDS=1'
|
||||
'-DANEOPIX_IND_DATA_GPIO=48'
|
||||
'-DANEOPIX_IND_NUM_LEDS=1'
|
||||
'-DRGB_INDICATORS=true'
|
||||
'-DNO_INT_TEMP_READING=true' ; Internal temperature reading not building on ESP32 C3 or S3
|
||||
'-DGateway_Name="OpenMQTTGateway_ESP32_BLE"'
|
||||
@@ -1541,13 +1534,12 @@ lib_deps =
|
||||
${libraries.wifimanager32}
|
||||
${libraries.ble}
|
||||
${libraries.decoder}
|
||||
${libraries.fastled}
|
||||
${libraries.adafruit_neopixel}
|
||||
build_flags =
|
||||
${com-esp.build_flags}
|
||||
'-DZgatewayBT="BT"'
|
||||
'-DFASTLED_IND_DATA_GPIO=8'
|
||||
'-DFASTLED_IND_TYPE=NEOPIXEL'
|
||||
'-DFASTLED_IND_NUM_LEDS=1'
|
||||
'-DANEOPIX_IND_DATA_GPIO=8'
|
||||
'-DANEOPIX_IND_NUM_LEDS=1'
|
||||
'-DRGB_INDICATORS=true'
|
||||
'-DNO_INT_TEMP_READING=true' ; Internal temperature reading not building on ESP32 C3 or S3
|
||||
'-DGateway_Name="OpenMQTTGateway_ESP32_BLE"'
|
||||
@@ -1572,10 +1564,41 @@ build_flags =
|
||||
custom_description = BLE gateway on the C3
|
||||
custom_hardware = AirM2M ESP32C3-CORE
|
||||
|
||||
; Espressiv ESP32-C3-DevKitC-02
|
||||
[env:esp32c3-dev-c2-ble]
|
||||
platform = ${com.esp32_platform}
|
||||
board = esp32-c3-devkitm-1
|
||||
board_build.partitions = min_spiffs.csv
|
||||
lib_deps =
|
||||
${com-esp.lib_deps}
|
||||
${libraries.wifimanager32}
|
||||
${libraries.ble}
|
||||
${libraries.decoder}
|
||||
${libraries.adafruit_neopixel}
|
||||
build_flags =
|
||||
${com-esp.build_flags}
|
||||
'-DZgatewayBT="BT"'
|
||||
'-DANEOPIX_IND_DATA_GPIO=8'
|
||||
'-DANEOPIX_IND_NUM_LEDS=1'
|
||||
; '-DANEOPIX_BRIGHTNESS=10' ; 0 - 255, default 20
|
||||
'-DANEOPIX_COLOR_SCHEME=2' ; blue based signalling colors
|
||||
'-DRGB_INDICATORS=true'
|
||||
'-DNO_INT_TEMP_READING=true' ; No internal temperature reading on ESP32 C3 or S3
|
||||
'-DTRIGGER_GPIO=7'
|
||||
'-DGateway_Name="OpenMQTTGateway_ESP32C3_DKC02"'
|
||||
custom_description = BLE gateway on Espressiv ESP32-C3-DevKitC-02
|
||||
|
||||
[env:esp32c3-dev-c2-ble-no-serial]
|
||||
extends = env:esp32c3-dev-c2-ble
|
||||
build_flags =
|
||||
${env:esp32c3-dev-c2-ble.build_flags}
|
||||
'-DLOG_LEVEL=LOG_LEVEL_SILENT' ; ommit logging for increased stability
|
||||
'-DWM_DEBUG_LEVEL=0'
|
||||
custom_description = BLE gateway on Espressiv ESP32-C3-DevKitC-02 without logging
|
||||
|
||||
; Wemos Lolin C3 mini v2.1.0
|
||||
[env:lolin_c3_mini]
|
||||
platform = ${com.esp32_platform} ; standard is now @6.1.x, should not have `assert rwble.c 261` error anymore
|
||||
;platform = espressif32@5.3.0 ; override to @5.3.0. Includes a fixed for the `assert rwble.c 261` error
|
||||
platform = ${com.esp32_platform}
|
||||
board = lolin_c3_mini
|
||||
board_build.partitions = min_spiffs.csv
|
||||
monitor_speed = 115200
|
||||
@@ -1584,16 +1607,15 @@ lib_deps =
|
||||
${libraries.wifimanager32}
|
||||
${libraries.ble}
|
||||
${libraries.decoder}
|
||||
${libraries.adafruit_neopixel}
|
||||
build_flags =
|
||||
${com-esp.build_flags}
|
||||
'-DZgatewayBT="BT"'
|
||||
; FastLED must be disabled. FastLED is not compatible with this board at the current moment.
|
||||
; The LED pins must still be defined, to avoid an error loop on pin definitions.
|
||||
; These are dummy definitions and are not actually used. Any choice 2 - 10, 20, 21 should be fine.
|
||||
; See https://community.openmqttgateway.com/t/watchdog-kills-omg-on-esp32-c3-within-seconds/2192/15
|
||||
'-DLED_SEND_RECEIVE=10'
|
||||
'-DLED_INFO=6'
|
||||
'-DLED_ERROR=7'
|
||||
'-DANEOPIX_IND_DATA_GPIO=7'
|
||||
'-DANEOPIX_IND_NUM_LEDS=1'
|
||||
; '-DANEOPIX_BRIGHTNESS=10' ; 0 - 255, default 20
|
||||
'-DANEOPIX_COLOR_SCHEME=1' ; Alternative LED colour scheme: 2 = blue/gold. 1 = green/gold
|
||||
'-DRGB_INDICATORS=true'
|
||||
; The momentary switch on the board is connected to GPIO9
|
||||
'-DTRIGGER_GPIO=9'
|
||||
'-DNO_INT_TEMP_READING=true' ; No internal temperature on ESP32 C3 or S3
|
||||
@@ -1624,7 +1646,7 @@ lib_deps =
|
||||
${com-esp.lib_deps}
|
||||
${libraries.wifimanager32}
|
||||
${libraries.ble}
|
||||
${libraries.fastled}
|
||||
${libraries.adafruit_neopixel}
|
||||
${libraries.decoder}
|
||||
build_flags =
|
||||
${com-esp.build_flags}
|
||||
@@ -1633,13 +1655,12 @@ build_flags =
|
||||
'-DLED_SEND_RECEIVE_ON=0'
|
||||
'-DpubBLEServiceUUID=true'
|
||||
'-DGateway_Name="OpenMQTTGateway_THINGPULSE_BLE"'
|
||||
'-DFASTLED_IND_DATA_GPIO=32,GRB'
|
||||
'-DFASTLED_IND_TYPE=WS2812'
|
||||
'-DFASTLED_IND_NUM_LEDS=4'
|
||||
'-DFASTLED_INFO_LED=0'
|
||||
'-DFASTLED_SEND_RECEIVCE_LED=1'
|
||||
'-DFASTLED_ERROR_LED=2'
|
||||
'-DFASTLED_BRIGHTNESS=255'
|
||||
'-DANEOPIX_IND_DATA_GPIO=32'
|
||||
'-DANEOPIX_IND_NUM_LEDS=4'
|
||||
'-DANEOPIX_INFO_LED=0'
|
||||
'-DANEOPIX_SEND_RECEIVE_LED=1'
|
||||
'-DANEOPIX_ERROR_LED=2'
|
||||
'-DANEOPIX_BRIGHTNESS=255'
|
||||
'-DRGB_INDICATORS=true'
|
||||
; '-DsimplePublishing=true'
|
||||
custom_description = BLE Gateway using Wifi
|
||||
@@ -1653,7 +1674,7 @@ lib_deps =
|
||||
${com-esp.lib_deps}
|
||||
${libraries.wifimanager32}
|
||||
${libraries.ble}
|
||||
${libraries.fastled}
|
||||
${libraries.adafruit_neopixel}
|
||||
${libraries.decoder}
|
||||
build_flags =
|
||||
${com-esp.build_flags}
|
||||
@@ -1669,13 +1690,12 @@ build_flags =
|
||||
'-DETH_PHY_MDC=23'
|
||||
'-DETH_PHY_MDIO=18'
|
||||
'-DETH_CLK_MODE=ETH_CLOCK_GPIO16_OUT'
|
||||
'-DFASTLED_IND_DATA_GPIO=32,GRB'
|
||||
'-DFASTLED_IND_TYPE=WS2812'
|
||||
'-DFASTLED_IND_NUM_LEDS=4'
|
||||
'-DFASTLED_INFO_LED=0'
|
||||
'-DFASTLED_SEND_RECEIVCE_LED=1'
|
||||
'-DFASTLED_ERROR_LED=2'
|
||||
'-DFASTLED_BRIGHTNESS=255'
|
||||
'-DANEOPIX_IND_DATA_GPIO=32'
|
||||
'-DANEOPIX_IND_NUM_LEDS=4'
|
||||
'-DANEOPIX_INFO_LED=0'
|
||||
'-DANEOPIX_SEND_RECEIVE_LED=1'
|
||||
'-DANEOPIX_ERROR_LED=2'
|
||||
'-DANEOPIX_BRIGHTNESS=255'
|
||||
'-DRGB_INDICATORS=true'
|
||||
; '-DsimplePublishing=true'
|
||||
custom_description = BLE Gateway using ethernet, requires PIO configuration
|
||||
|
||||
+103
-56
@@ -508,78 +508,125 @@ int lowpowermode = DEFAULT_LOW_POWER_MODE;
|
||||
# define PowerIndicatorOFF() // Not used
|
||||
# define SetupIndicators() // Not used
|
||||
#else // Management of Errors, reception/emission and informations indicators with RGB LED
|
||||
# if !defined(CONFIG_IDF_TARGET_ESP32S3) && !defined(CONFIG_IDF_TARGET_ESP32C3) //I2S not available yet with Fastled on S3 and C3
|
||||
# define FASTLED_ESP32_I2S // To avoid ESP32 instabilities https://github.com/FastLED/FastLED/issues/1438
|
||||
# include <Adafruit_NeoPixel.h>
|
||||
# ifndef ANEOPIX_IND_TYPE // needs library constants
|
||||
# define ANEOPIX_IND_TYPE NEO_GRB + NEO_KHZ800 // ws2812 and alike
|
||||
# endif
|
||||
# include <FastLED.h>
|
||||
CRGB leds[FASTLED_IND_NUM_LEDS];
|
||||
# ifdef FASTLED_IND_DATA_GPIO2 // Only used for Critical Indicator
|
||||
CRGB leds2[FASTLED_IND_NUM_LEDS];
|
||||
Adafruit_NeoPixel leds(ANEOPIX_IND_NUM_LEDS, ANEOPIX_IND_DATA_GPIO, ANEOPIX_IND_TYPE);
|
||||
# ifdef ANEOPIX_IND_DATA_GPIO2 // Only used for Critical Indicator
|
||||
// assume the same LED type
|
||||
Adafruit_NeoPixel leds2(ANEOPIX_IND_NUM_LEDS, ANEOPIX_IND_DATA_GPIO2, ANEOPIX_IND_TYPE);
|
||||
# endif
|
||||
|
||||
# ifndef RGB_LED_POWER
|
||||
# define RGB_LED_POWER -1 // If the RGB Led is linked to GPIO pin for power define it here
|
||||
# endif
|
||||
# ifndef FASTLED_BRIGHTNESS
|
||||
# define FASTLED_BRIGHTNESS 20 // Set Default RGB brightness to approx 10% (0-255 scale)
|
||||
# ifndef ANEOPIX_BRIGHTNESS
|
||||
# define ANEOPIX_BRIGHTNESS 20 // Set Default RGB brightness to approx 10% (0-255 scale)
|
||||
# endif
|
||||
# ifndef ANEOPIX_COLOR_SCHEME // allow for different color combinations
|
||||
# define ANEOPIX_COLOR_SCHEME 0
|
||||
# endif
|
||||
// Allow to set LED used (for example thingpulse gateway has 4 we use them independently)
|
||||
# ifndef FASTLED_INFO_LED
|
||||
# define FASTLED_INFO_LED 0 // First Led
|
||||
# ifndef ANEOPIX_INFO_LED
|
||||
# define ANEOPIX_INFO_LED 0 // First Led
|
||||
# endif
|
||||
# ifndef FASTLED_SEND_RECEIVCE_LED
|
||||
# define FASTLED_SEND_RECEIVCE_LED 0 // First Led
|
||||
# ifndef ANEOPIX_SEND_RECEIVE_LED
|
||||
# define ANEOPIX_SEND_RECEIVE_LED 0 // First Led
|
||||
# endif
|
||||
# ifndef FASTLED_ERROR_LED
|
||||
# define FASTLED_ERROR_LED 0 // First Led
|
||||
# ifndef ANEOPIX_ERROR_LED
|
||||
# define ANEOPIX_ERROR_LED 0 // First Led
|
||||
# endif
|
||||
# ifndef FASTLED_CRITICAL_LED
|
||||
# define FASTLED_CRITICAL_LED 0 // First Led
|
||||
# ifndef ANEOPIX_CRITICAL_LED
|
||||
# define ANEOPIX_CRITICAL_LED 0 // First Led
|
||||
# endif
|
||||
// compile time calculation of color values
|
||||
# define ANEOPIX_RED ((0xFF * ANEOPIX_BRIGHTNESS) >> 8) << 16
|
||||
# define ANEOPIX_RED_DIM ((0x3F * ANEOPIX_BRIGHTNESS) >> 8) << 16 // dimmed /4
|
||||
# define ANEOPIX_ORANGE (((0xFF * ANEOPIX_BRIGHTNESS) >> 8) << 16) | \
|
||||
(((0xA5 * ANEOPIX_BRIGHTNESS) >> 8) << 8)
|
||||
# define ANEOPIX_GOLD (((0xFF * ANEOPIX_BRIGHTNESS) >> 8) << 16) | \
|
||||
(((0xD7 * ANEOPIX_BRIGHTNESS) >> 8) << 8)
|
||||
# define ANEOPIX_GREEN ((0xFF * ANEOPIX_BRIGHTNESS) >> 8) << 8
|
||||
# define ANEOPIX_GREEN_DIM ((0x3F * ANEOPIX_BRIGHTNESS) >> 8) << 8 // dimmed /4
|
||||
# define ANEOPIX_AQUA (((0xFF * ANEOPIX_BRIGHTNESS) >> 8) << 8) | \
|
||||
(0xFF * ANEOPIX_BRIGHTNESS) >> 8
|
||||
# define ANEOPIX_BLUE (0xFF * ANEOPIX_BRIGHTNESS) >> 8
|
||||
# define ANEOPIX_BLUE_DIM (0x3F * ANEOPIX_BRIGHTNESS) >> 8 // dimmed /4
|
||||
# define ANEOPIX_BLACK 0
|
||||
|
||||
# ifndef FASTLED_IND_DATA_GPIO2
|
||||
# define SetupIndicators() \
|
||||
pinMode(RGB_LED_POWER, OUTPUT); \
|
||||
digitalWrite(RGB_LED_POWER, HIGH); \
|
||||
FastLED.addLeds<FASTLED_IND_TYPE, FASTLED_IND_DATA_GPIO>(leds, FASTLED_IND_NUM_LEDS); \
|
||||
FastLED.setBrightness(FASTLED_BRIGHTNESS)
|
||||
# if ANEOPIX_COLOR_SCHEME == 0
|
||||
// original color combination remains default
|
||||
# define ANEOPIX_INFO ANEOPIX_GREEN
|
||||
# define ANEOPIX_ERROR ANEOPIX_ORANGE
|
||||
# define ANEOPIX_SENDRECEIVE ANEOPIX_BLUE
|
||||
# define ANEOPIX_CRITICAL ANEOPIX_RED // second led
|
||||
# define ANEOPIX_POWER ANEOPIX_GREEN // second led
|
||||
# define ANEOPIX_BOOT ANEOPIX_BLACK // unused
|
||||
# define ANEOPIX_OFF ANEOPIX_BLACK
|
||||
// color combinations tested for good visibility of onboard leds
|
||||
# elif ANEOPIX_COLOR_SCHEME == 1
|
||||
# define ANEOPIX_INFO ANEOPIX_GREEN_DIM // dimmed green info background
|
||||
# define ANEOPIX_ERROR ANEOPIX_RED_DIM
|
||||
# define ANEOPIX_SENDRECEIVE ANEOPIX_GOLD // bright gold = sending
|
||||
# define ANEOPIX_CRITICAL ANEOPIX_BLACK // unused
|
||||
# define ANEOPIX_POWER ANEOPIX_BLACK // unused
|
||||
# define ANEOPIX_BOOT ANEOPIX_AQUA
|
||||
# define ANEOPIX_OFF ANEOPIX_BLACK
|
||||
# else
|
||||
# define SetupIndicators() \
|
||||
pinMode(RGB_LED_POWER, OUTPUT); \
|
||||
digitalWrite(RGB_LED_POWER, HIGH); \
|
||||
FastLED.addLeds<FASTLED_IND_TYPE, FASTLED_IND_DATA_GPIO>(leds, FASTLED_IND_NUM_LEDS); \
|
||||
FastLED.addLeds<FASTLED_IND_TYPE, FASTLED_IND_DATA_GPIO2>(leds2, FASTLED_IND_NUM_LEDS); \
|
||||
FastLED.setBrightness(FASTLED_BRIGHTNESS)
|
||||
# define ANEOPIX_INFO ANEOPIX_BLUE_DIM // dimmed blue info background
|
||||
# define ANEOPIX_ERROR ANEOPIX_RED_DIM
|
||||
# define ANEOPIX_SENDRECEIVE ANEOPIX_GOLD // bright gold = sending
|
||||
# define ANEOPIX_CRITICAL ANEOPIX_BLACK // unused
|
||||
# define ANEOPIX_POWER ANEOPIX_BLACK // unused
|
||||
# define ANEOPIX_BOOT ANEOPIX_AQUA
|
||||
# define ANEOPIX_OFF ANEOPIX_BLACK
|
||||
# endif
|
||||
# define ErrorIndicatorON() \
|
||||
leds[FASTLED_ERROR_LED] = CRGB::Orange; \
|
||||
FastLED.show()
|
||||
# define ErrorIndicatorOFF() \
|
||||
leds[FASTLED_ERROR_LED] = CRGB::Black; \
|
||||
FastLED.show()
|
||||
# define SendReceiveIndicatorON() \
|
||||
leds[FASTLED_SEND_RECEIVCE_LED] = CRGB::Blue; \
|
||||
FastLED.show()
|
||||
# define SendReceiveIndicatorOFF() \
|
||||
leds[FASTLED_SEND_RECEIVCE_LED] = CRGB::Black; \
|
||||
FastLED.show()
|
||||
# define InfoIndicatorON() \
|
||||
leds[FASTLED_INFO_LED] = CRGB::Green; \
|
||||
FastLED.show()
|
||||
# define InfoIndicatorOFF() \
|
||||
leds[FASTLED_INFO_LED] = CRGB::Black; \
|
||||
FastLED.show()
|
||||
# ifdef FASTLED_IND_DATA_GPIO2 // Used for relay power indicator
|
||||
# ifndef ANEOPIX_IND_DATA_GPIO2
|
||||
// during boot the RGB LED is on to signal also reboots
|
||||
# define SetupIndicators() \
|
||||
pinMode(RGB_LED_POWER, OUTPUT); \
|
||||
digitalWrite(RGB_LED_POWER, HIGH); \
|
||||
leds.begin(); \
|
||||
leds.setPixelColor(ANEOPIX_INFO_LED, ANEOPIX_BOOT); \
|
||||
leds.show();
|
||||
# else
|
||||
# define SetupIndicators() \
|
||||
pinMode(RGB_LED_POWER, OUTPUT); \
|
||||
digitalWrite(RGB_LED_POWER, HIGH); \
|
||||
leds.begin(); \
|
||||
leds2.begin();
|
||||
# endif
|
||||
# define ErrorIndicatorON() \
|
||||
leds.setPixelColor(ANEOPIX_ERROR_LED, ANEOPIX_ERROR); \
|
||||
leds.show();
|
||||
# define ErrorIndicatorOFF() \
|
||||
leds.setPixelColor(ANEOPIX_ERROR_LED, ANEOPIX_OFF); \
|
||||
leds.show();
|
||||
# define SendReceiveIndicatorON() \
|
||||
leds.setPixelColor(ANEOPIX_SEND_RECEIVE_LED, ANEOPIX_SENDRECEIVE); \
|
||||
leds.show();
|
||||
# define SendReceiveIndicatorOFF() \
|
||||
leds.setPixelColor(ANEOPIX_SEND_RECEIVE_LED, ANEOPIX_OFF); \
|
||||
leds.show();
|
||||
# define InfoIndicatorON() \
|
||||
leds.setPixelColor(ANEOPIX_INFO_LED, ANEOPIX_INFO); \
|
||||
leds.show();
|
||||
# define InfoIndicatorOFF() \
|
||||
leds.setPixelColor(ANEOPIX_INFO_LED, ANEOPIX_OFF); \
|
||||
leds.show();
|
||||
# ifdef ANEOPIX_IND_DATA_GPIO2 // Used for relay power indicator
|
||||
// For the critical ON indicator there is no method to turn it off, the only way is to unplug the device
|
||||
// This enable to have persistence of the indicator to inform the user
|
||||
# define CriticalIndicatorON() \
|
||||
leds2[FASTLED_INFO_LED] = CRGB::Red; \
|
||||
FastLED.show()
|
||||
# define PowerIndicatorON() \
|
||||
leds2[FASTLED_INFO_LED] = CRGB::Green; \
|
||||
FastLED.show()
|
||||
# define PowerIndicatorOFF() \
|
||||
leds2[FASTLED_INFO_LED] = CRGB::Black; \
|
||||
FastLED.show()
|
||||
# define CriticalIndicatorON() \
|
||||
leds.setPixelColor(ANEOPIX_INFO_LED, ANEOPIX_CRITICAL); \
|
||||
leds.show();
|
||||
# define PowerIndicatorON() \
|
||||
leds2.setPixelColor(ANEOPIX_INFO_LED, ANEOPIX_INFO); \
|
||||
leds2.show();
|
||||
# define PowerIndicatorOFF() \
|
||||
leds2.setPixelColor(ANEOPIX_INFO_LED, ANEOPIX_OFF); \
|
||||
leds2.show();
|
||||
# endif
|
||||
# define SetupIndicatorInfo()
|
||||
# define SetupIndicatorSendReceive()
|
||||
|
||||
@@ -98,6 +98,7 @@ extra_configs =
|
||||
;default_envs = esp32s3-dev-c1-ble
|
||||
;default_envs = esp32c3-dev-m1-ble
|
||||
;default_envs = airm2m_core_esp32c3
|
||||
;default_envs = esp32c3-dev-c2-ble
|
||||
;default_envs = lolin_c3_mini
|
||||
;default_envs = thingpulse-espgateway
|
||||
;default_envs = thingpulse-espgateway-ethernet
|
||||
@@ -138,6 +139,7 @@ ethernet = Ethernet
|
||||
esp8266_mdns = esp8266_mdns
|
||||
wire = Wire
|
||||
fastled = fastled/FastLED@3.5.0
|
||||
adafruit_neopixel = adafruit/Adafruit NeoPixel@^1.11.0
|
||||
onewire = paulstoffregen/OneWire@2.3.7
|
||||
dallastemperature = DallasTemperature
|
||||
m5stickc = M5StickC@0.2.0
|
||||
|
||||
Reference in new issue
Block a user