Added Thingpulse ESP32 gateways (#1369)
* added thingspulse gateways * added thingspulse gateways, RGB LED for tinypico * Added some LED and Birghtness options * Requested Changes * fixed format
This commit is contained in:
1 parent
827724f079
commit
edb8d1a591
5 files changed
+94
-15
No files matched your search
@@ -71,6 +71,8 @@ jobs:
|
||||
- "esp32dev-ble-datatest"
|
||||
- "esp32s3-dev-c1-ble"
|
||||
- "esp32c3-dev-m1-ble"
|
||||
- "thingpulse-espgateway"
|
||||
- "thingpulse-espgateway-ethernet"
|
||||
runs-on: ubuntu-latest
|
||||
name: Build with PlatformIO
|
||||
steps:
|
||||
|
||||
+27
-13
@@ -454,28 +454,42 @@ CRGB leds[FASTLED_IND_NUM_LEDS];
|
||||
# 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)
|
||||
# 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
|
||||
# endif
|
||||
# ifndef FASTLED_SEND_RECEIVCE_LED
|
||||
# define FASTLED_SEND_RECEIVCE_LED 0 // First Led
|
||||
# endif
|
||||
# ifndef FASTLED_ERROR_LED
|
||||
# define FASTLED_ERROR_LED 0 // First Led
|
||||
# endif
|
||||
|
||||
# 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(20);
|
||||
# define ErrorIndicatorON() \
|
||||
leds[0] = CRGB::Orange; \
|
||||
FastLED.setBrightness(FASTLED_BRIGHTNESS);
|
||||
# define ErrorIndicatorON() \
|
||||
leds[FASTLED_ERROR_LED] = CRGB::Orange; \
|
||||
FastLED.show()
|
||||
# define ErrorIndicatorOFF() \
|
||||
leds[0] = CRGB::Black; \
|
||||
# define ErrorIndicatorOFF() \
|
||||
leds[FASTLED_ERROR_LED] = CRGB::Black; \
|
||||
FastLED.show()
|
||||
# define SendReceiveIndicatorON() \
|
||||
leds[0] = CRGB::Blue; \
|
||||
# define SendReceiveIndicatorON() \
|
||||
leds[FASTLED_SEND_RECEIVCE_LED] = CRGB::Blue; \
|
||||
FastLED.show()
|
||||
# define SendReceiveIndicatorOFF() \
|
||||
leds[0] = CRGB::Black; \
|
||||
# define SendReceiveIndicatorOFF() \
|
||||
leds[FASTLED_SEND_RECEIVCE_LED] = CRGB::Black; \
|
||||
FastLED.show()
|
||||
# define InfoIndicatorON() \
|
||||
leds[0] = CRGB::Green; \
|
||||
# define InfoIndicatorON() \
|
||||
leds[FASTLED_INFO_LED] = CRGB::Green; \
|
||||
FastLED.show()
|
||||
# define InfoIndicatorOFF() \
|
||||
leds[0] = CRGB::Black; \
|
||||
# define InfoIndicatorOFF() \
|
||||
leds[FASTLED_INFO_LED] = CRGB::Black; \
|
||||
FastLED.show()
|
||||
#endif
|
||||
|
||||
|
||||
@@ -890,6 +890,7 @@ build_flags =
|
||||
${com-esp.build_flags}
|
||||
'-DZgatewayBT="BT"'
|
||||
'-DGateway_Name="OpenMQTTGateway_ESP32_TINYPICO_BLE"'
|
||||
|
||||
board_build.flash_mode = dio
|
||||
|
||||
[env:ttgo-lora32-v1-868]
|
||||
@@ -1451,3 +1452,65 @@ build_flags =
|
||||
'-DFASTLED_IND_NUM_LEDS=1'
|
||||
'-DRGB_INDICATORS=true'
|
||||
'-DGateway_Name="OpenMQTTGateway_ESP32_BLE"'
|
||||
|
||||
[env:thingpulse-espgateway]
|
||||
platform = ${com.esp32_platform}
|
||||
board = esp32dev
|
||||
board_build.partitions = min_spiffs.csv
|
||||
lib_deps =
|
||||
${com-esp.lib_deps}
|
||||
${libraries.wifimanager32}
|
||||
${libraries.ble}
|
||||
${libraries.fastled}
|
||||
${libraries.decoder}
|
||||
build_flags =
|
||||
${com-esp.build_flags}
|
||||
'-DZgatewayBT="BT"'
|
||||
'-DLED_SEND_RECEIVE=2'
|
||||
'-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'
|
||||
'-DRGB_INDICATORS=true'
|
||||
; '-DsimplePublishing=true'
|
||||
|
||||
|
||||
[env:thingpulse-espgateway-ethernet]
|
||||
platform = ${com.esp32_platform}
|
||||
board = esp32dev
|
||||
board_build.partitions = min_spiffs.csv
|
||||
lib_deps =
|
||||
${com-esp.lib_deps}
|
||||
${libraries.wifimanager32}
|
||||
${libraries.ble}
|
||||
${libraries.fastled}
|
||||
${libraries.decoder}
|
||||
build_flags =
|
||||
${com-esp.build_flags}
|
||||
'-DZgatewayBT="BT"'
|
||||
'-DLED_SEND_RECEIVE=2'
|
||||
'-DLED_SEND_RECEIVE_ON=0'
|
||||
'-DpubBLEServiceUUID=true'
|
||||
'-DGateway_Name="OpenMQTTGateway_THINGPULSE_ETH_BLE"'
|
||||
'-DESP32_ETHERNET=true'
|
||||
'-DETH_PHY_TYPE=ETH_PHY_LAN8720'
|
||||
'-DETH_PHY_ADDR=0'
|
||||
'-DETH_PHY_POWER=5'
|
||||
'-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'
|
||||
'-DRGB_INDICATORS=true'
|
||||
; '-DsimplePublishing=true'
|
||||
+1
-1
@@ -119,7 +119,7 @@ with open(manif_path + filename,'wb') as output_file:
|
||||
|
||||
for item in range(len(assets)):
|
||||
name = assets[item]['name']
|
||||
if 'firmware.bin' in name and ('esp32' in name or 'ttgo' in name or 'heltec' in name):
|
||||
if 'firmware.bin' in name and ('esp32' in name or 'ttgo' in name or 'heltec' in name or 'thingpulse' in name):
|
||||
fw = name.split('-firmware')[0]
|
||||
man_file = fw + '.manifest.json'
|
||||
fw_url = assets[item]['browser_download_url']
|
||||
|
||||
@@ -107,7 +107,7 @@ with open(manif_path + filename,'wb') as output_file:
|
||||
output_file.write(boot_bin.content)
|
||||
|
||||
for name in os.listdir(bin_path):
|
||||
if 'firmware.bin' in name and ('esp32' in name or 'ttgo' in name or 'heltec' in name):
|
||||
if 'firmware.bin' in name and ('esp32' in name or 'ttgo' in name or 'heltec' in name or 'thingpulse' in name):
|
||||
fw = name.split('-firmware')[0]
|
||||
man_file = fw + '.manifest.json'
|
||||
print('Bin name:' + name)
|
||||
|
||||
Reference in new issue
Block a user