mirror of
https://github.com/sudomesh/disaster-radio.git
synced 2026-02-19 17:51:18 +01:00
Redefined pins for v3, added two-module instantiation in main
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -13,7 +13,8 @@ web/node_modules
|
||||
makeEspArduino/
|
||||
lib/**
|
||||
firmware/lib/**
|
||||
|
||||
hardware/board_esp32_v3/**
|
||||
firmware/platformio.ini
|
||||
.pio
|
||||
.vscode
|
||||
secrets.h
|
||||
|
||||
@@ -99,24 +99,25 @@
|
||||
#endif
|
||||
|
||||
#ifdef ESP32_V3
|
||||
#define LORA_IRQ 36
|
||||
#define LORA_CS 27
|
||||
#define LORA_IO1 11
|
||||
|
||||
#define LORA_IRQ 22
|
||||
#define LORA_CS 16
|
||||
#define LORA_IO1 26
|
||||
#define LORA_IO2 NOT_A_PIN
|
||||
#define LORA_RST 15
|
||||
#define LORA_SCK 30
|
||||
#define LORA_MOSI 37
|
||||
#define LORA_MISO 31
|
||||
#define LORA_RXEN 28
|
||||
#define LORA_RST NOT_A_PIN
|
||||
#define LORA_SCK 18
|
||||
#define LORA_MOSI 23
|
||||
#define LORA_MISO 19
|
||||
#define LORA_RXEN 17
|
||||
|
||||
//comment all LORA2 lines and -DDUAL_LORA build flag to disable second module
|
||||
|
||||
#define LORA2_CS 9
|
||||
#define LORA2_IRQ 7
|
||||
#define LORA2_RST 15
|
||||
#define LORA2_IO1 12
|
||||
#define LORA2_CS 33
|
||||
#define LORA2_IRQ 35
|
||||
#define LORA2_RST NOT_A_PIN
|
||||
#define LORA2_IO1 27
|
||||
#define LORA2_IO2 NOT_A_PIN
|
||||
#define LORA2_RXEN 33
|
||||
#define LORA2_RXEN 21
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
#ifdef RL_SX1276
|
||||
#include <Layer1_SX1276.h>
|
||||
#endif
|
||||
#ifdef RL_SX1262
|
||||
#include <Layer1_SX126x.h>
|
||||
#endif
|
||||
|
||||
#include <LoRaLayer2.h>
|
||||
|
||||
@@ -79,6 +82,13 @@ SX1276 lora = new Module(LORA_CS, LORA_IRQ, LORA_RST, RADIOLIB_NC);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef RL_SX1262
|
||||
SX1262 lora = new Module(LORA_CS, LORA_IRQ, LORA_RST, RADIOLIB_NC);
|
||||
#ifdef DUAL_LORA
|
||||
SX1262 lora2 = new Module(LORA2_CS, LORA2_IRQ, LORA2_RST, RADIOLIB_NC);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
LL2Class *LL2;
|
||||
|
||||
#include "settings/settings.h"
|
||||
@@ -355,7 +365,7 @@ void setupLoRa()
|
||||
Layer1_1->setTxPower(txPower);
|
||||
Layer1_1->setSpreadingFactor(spreadingFactor);
|
||||
#endif
|
||||
#ifdef RL_SX1276
|
||||
#ifdef RL_SX1262
|
||||
pinMode(LORA_CS, OUTPUT);
|
||||
digitalWrite(LORA_CS, LOW);
|
||||
#ifdef DUAL_LORA
|
||||
@@ -366,7 +376,7 @@ void setupLoRa()
|
||||
#ifdef DUAL_LORA
|
||||
digitalWrite(LORA_CS, HIGH);
|
||||
digitalWrite(LORA2_CS, LOW);
|
||||
Layer1Class *Layer1_2 = new Layer1Class(&lora2, 0, LORA2_CS, LORA2_RST, LORA2_IRQ, 7, 433, 17);
|
||||
Layer1Class *Layer1_2 = new Layer1Class(&lora2, 0, LORA2_CS, LORA2_RST, LORA2_IRQ, 7, 915, 17);
|
||||
digitalWrite(LORA_CS, LOW);
|
||||
digitalWrite(LORA2_CS, HIGH);
|
||||
#endif
|
||||
|
||||
@@ -13,12 +13,12 @@ src_dir = .
|
||||
data_dir = ../web/static
|
||||
default_envs=
|
||||
;ttgo-lora32-v1
|
||||
ttgo-lora32-v2
|
||||
;ttgo-lora32-v2
|
||||
;ttgo-lora32-tbeam
|
||||
;heltec-v2
|
||||
;sparkfun-lora
|
||||
; lopy4
|
||||
; esp32-v3
|
||||
esp32-v3
|
||||
|
||||
[env]
|
||||
platform = https://github.com/platformio/platform-espressif32.git
|
||||
@@ -35,7 +35,7 @@ lib_deps =
|
||||
ESP Async WebServer@1.2.3
|
||||
LoRa@0.7.2
|
||||
https://github.com/jgromes/RadioLib#3682c6c9215891e3afb7672f1235fde1c3bd75fd
|
||||
https://github.com/sudomesh/LoRaLayer2#efaa3fa73e3c8f6a7c66e335873c0bd81cc865e3
|
||||
https://github.com/code8buster/LoRaLayer2.git#esp32v3
|
||||
https://github.com/paidforby/AsyncSDServer#13375c6be978cb34180378ecf4042a3a4a1f5eab
|
||||
ESP8266 and ESP32 OLED driver for SSD1306 displays
|
||||
TinyGPSPlus@1.0.2
|
||||
@@ -95,8 +95,9 @@ build_flags = -DLOPY4
|
||||
; -DLL2_DEBUG
|
||||
[env:esp32-v3]
|
||||
board = esp32dev
|
||||
board_upload.maximum_size = 4194304
|
||||
board_upload.maximum_ram_size = 532480
|
||||
build_flags = -DESP32_V3
|
||||
-DRL_SX1276
|
||||
-DRL_SX1262
|
||||
-I./src
|
||||
-DDUAL_LORA
|
||||
|
||||
Reference in New Issue
Block a user