Skip to content

Commit

Permalink
wireless stick support
Browse files Browse the repository at this point in the history
Signed-off-by: Brenton Poke <[email protected]>
  • Loading branch information
BrentonPoke committed Nov 3, 2024
1 parent 136603a commit 0ad5a66
Show file tree
Hide file tree
Showing 6 changed files with 218 additions and 33 deletions.
10 changes: 10 additions & 0 deletions examples/1.Ducks/MamaDuck/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ description = DuckLink CDP examples
${env:esp32.lib_deps}
${env:local_cdp.lib_deps}

[env:local_heltec_wireless_stick]
platform = espressif32
board = heltec_wifi_lora_32_V3
framework = arduino
monitor_speed = 115200
monitor_filters = time
lib_deps =
${env:esp32.lib_deps}
${env:local_cdp.lib_deps}

; LOCAL LILYGO_T_BEAM_SX1262
[env:local_lilygo_t_beam_sx1262]
platform = espressif32
Expand Down
185 changes: 174 additions & 11 deletions examples/3.Custom-Mama-Examples/Custom-Mama-Example/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,181 @@
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html


; Some useful platformio CLI commands to build and uplaod the example code.

; using the released CDP library
; platformio run -e prod_heltec_wifi_lora_32_V3 -t upload

; using the local CDP library
; platformio run -e local_heltec_wifi_lora_32_V3 -t upload


[platformio]
src_dir = .
src_dir = .
;; uncomment the line below to build for your board

default_envs = local_heltec_wifi_lora_32_V3
; default_envs = local_heltec_wifi_lora_32_V3
; default_envs = local_heltec_wifi_lora_32_V2
; default_envs = local_ttgo_t_beam

; default_envs = prod_heltec_wifi_lora_32_V3
; default_envs = prod_heltec_wifi_lora_32_V2
; default_envs = prod_ttgo_t_beam

description = DuckLink CDP examples

[env]
lib_deps =
WIRE
SPI
contrem/arduino-timer@^3.0.1
bblanchon/ArduinoJson@^7.0.3

[env:esp32]
lib_deps =

[env:local_cdp]
lib_deps = symlink://../../../ ; local CDP library

[env:release_cdp]
lib_deps =
https://github.com/ClusterDuck-Protocol/ClusterDuck-Protocol ; CDP from master branch


; -------------------------------------------------------------------------------------------------------
; ---- PRODUCTION ENVIRONMENTS
; -------------------------------------------------------------------------------------------------------


; PRODUCTION HELTEC_WIFI_LORA_32_V2
[env:prod_heltec_wifi_lora_32_V2]
platform = espressif32
board = heltec_wifi_lora_32_V2
framework = arduino
monitor_speed = 115200
monitor_filters = time
lib_deps =
${env:esp32.lib_deps}
${env:release_cdp.lib_deps}

; PRODUCTION HELTEC_WIFI_LORA_32_V3
[env:prod_heltec_wifi_lora_32_V3]
platform = espressif32
board = heltec_wifi_lora_32_V3
framework = arduino
monitor_speed = 115200
monitor_filters = time
lib_deps =
${env:esp32.lib_deps}
${env:release_cdp.lib_deps}

; PRODUCTION LILYGO_T_BEAM_SX1262
[env:prod_lilygo_t_beam_sx1262]
platform = espressif32
board = ttgo-t-beam
framework = arduino
monitor_speed = 115200
monitor_filters = time
lib_deps =
${env:esp32.lib_deps}
${env:release_cdp.lib_deps}

; PRODUCTION TTGO_LORA32_V1
[env:prod_ttgo_lora32_v1]
platform = espressif32
board = ttgo-lora32-v1
framework = arduino
monitor_speed = 115200
monitor_filters = time
lib_deps =
${env:esp32.lib_deps}
${env:release_cdp.lib_deps}

; PRODUCTION CUBECELL_BOARD_V2
[env:prod_cubecell_board_v2]
platform = https://github.com/HelTecAutomation/heltec-cubecell.git
board = cubecell_board_v2
framework = arduino
monitor_speed = 115200
monitor_filters = time
build_flags =
-DCubeCell_Board
lib_ignore =
ESP Async WebServer
lib_deps =
${env:release_cdp.lib_deps}

; -------------------------------------------------------------------------------------------------------
; ---- LOCAL ENVIRONMENTS
; -------------------------------------------------------------------------------------------------------

; LOCAL HELTEC_WIFI_LORA_32_V2
[env:local_heltec_wifi_lora_32_V2]
platform = espressif32
board = heltec_wifi_lora_32_V2
framework = arduino
monitor_speed = 115200
monitor_filters = time
lib_deps =
${env:esp32.lib_deps}
${env:local_cdp.lib_deps}

; LOCAL HELTEC_WIFI_LORA_32_V3
[env:local_heltec_wifi_lora_32_V3]
platform = espressif32
board = heltec_wifi_lora_32_V3
framework = arduino
monitor_speed = 115200
monitor_filters = time
lib_deps =
${env:esp32.lib_deps}
${env:local_cdp.lib_deps}

[env:local_heltec_wireless_stick]
platform = espressif32
board = heltec_wifi_lora_32_V3
framework = arduino
monitor_speed = 115200
monitor_filters = time
lib_deps =
${env:esp32.lib_deps}
${env:local_cdp.lib_deps}

; LOCAL LILYGO_T_BEAM_SX1262
[env:local_lilygo_t_beam_sx1262]
platform = espressif32
board = ttgo-t-beam
framework = arduino
monitor_speed = 115200
monitor_filters = time
lib_deps =
${env:esp32.lib_deps}
${env:local_cdp.lib_deps}

[env:heltec_wifi_lora_32_V2]
platform = espressif32
board = heltec_wifi_lora_32_V2
framework = arduino
monitor_speed = 115200
monitor_filters = time
; LOCAL TTGO_LORA32_V1
[env:local_ttgo_lora32_v1]
platform = espressif32
board = ttgo-lora32-v1
framework = arduino
monitor_speed = 115200
monitor_filters = time
lib_deps =
${env:esp32.lib_deps}
${env:local_cdp.lib_deps}

lib_deps =
https://github.com/Call-for-Code/ClusterDuck-Protocol
; LOCAL CUBECELL_BOARD_V2
[env:local_cubecell_board_v2]
platform = https://github.com/HelTecAutomation/heltec-cubecell.git
board = cubecell_board_v2
framework = arduino
monitor_speed = 115200
monitor_filters = time
build_flags =
-DCubeCell_Board
lib_ignore =
ESP Async WebServer
lib_deps =
${env:local_cdp.lib_deps}

; uncomment for OTA update
; upload_port = duck.local
10 changes: 8 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@

[platformio]

; default_envs = heltec_wifi_lora_32_V3
default_envs = heltec_wifi_lora_32_V3
; default_envs = heltec_wifi_lora_32_V2
default_envs = lilygo_t_beam_sx1262
; default_envs = heltec_wireless_stick
; default_envs = lilygo_t_beam_sx1262
; default_envs = cubecell_gps
; default_envs = cubecell_board_v2
; default_envs = ttgo_lora32_v1
Expand Down Expand Up @@ -145,6 +146,11 @@
${cubecell_base.build_flags}
-DCubeCell_Board

[env:heltec_wireless_stick]
extends = esp32_base
board = heltec_wifi_lora_32_V3
build_flags =
${env.build_flags}
;;--------------------------------------------------------------------------------
;; test environments
;;--------------------------------------------------------------------------------
Expand Down
20 changes: 0 additions & 20 deletions src/include/boards/ttgo-t-beam.h

This file was deleted.

25 changes: 25 additions & 0 deletions src/include/boards/wireless_stick_v3.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#pragma once
#ifdef ARDUINO_HELTEC_WIRELESS_STICK
#define CDPCFG_PIN_BAT 1
//#define CDPCFG_BAT_MULDIV 200 / 100
#define CDPCFG_PIN_VEXT 36
#define CDPCFG_PIN_LED1 35
#define CDPCFG_OLED_64x32

// LoRa configuration
#define CDPCFG_PIN_LORA_CS 8
#define CDPCFG_PIN_LORA_DIO0 14
#define CDPCFG_PIN_LORA_DIO1 14
#define CDPCFG_PIN_LORA_RST 12
#define CDPCFG_PIN_LORA_BUSY 13

//GPS configuration
//#define CDPCFG_GPS_RX 34
//#define CDPCFG_GPS_TX 12

// OLED display settings
#define CDPCFG_PIN_OLED_CLOCK 18
#define CDPCFG_PIN_OLED_DATA 17
#define CDPCFG_PIN_OLED_RESET 21
#define CDPCFG_PIN_OLED_ROTATION U8G2_R0
#endif
1 change: 1 addition & 0 deletions src/include/cdpcfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "cdp_external_board.h"
#else
#include "boards/heltec_wifi_lora_32_V3.h"
#include "boards/wireless_stick_v3.h"
#include "boards/heltec_wifi_lora_32_V2.h"
#include "boards/lilygo_t_beam_sx1262.h"
#include "boards/ttgo_t_beam_v1_sx1276.h"
Expand Down

0 comments on commit 0ad5a66

Please sign in to comment.