[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
|
||||
|
||||
Reference in new issue
Block a user