add support for T-Beam v0.7
This commit is contained in:
parent
108a83291c
commit
f109099b0f
2 changed files with 26 additions and 16 deletions
|
@ -1,21 +1,11 @@
|
||||||
; PlatformIO Project Configuration File
|
[env]
|
||||||
;
|
|
||||||
; Build options: build flags, source filter
|
|
||||||
; Upload options: custom upload port, speed and extra flags
|
|
||||||
; Library options: dependencies, extra library storages
|
|
||||||
; Advanced options: extra scripting
|
|
||||||
;
|
|
||||||
; Please visit documentation for the other options and examples
|
|
||||||
; https://docs.platformio.org/page/projectconf.html
|
|
||||||
|
|
||||||
[platformio]
|
|
||||||
default_envs = ttgo-t-beam
|
|
||||||
|
|
||||||
[env:ttgo-t-beam]
|
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
board = ttgo-t-beam
|
|
||||||
framework = arduino
|
framework = arduino
|
||||||
|
board = ttgo-t-beam
|
||||||
lib_ldf_mode = deep+
|
lib_ldf_mode = deep+
|
||||||
|
monitor_speed = 115200
|
||||||
|
|
||||||
|
[env:ttgo-t-beam-v1]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
Adafruit GFX Library
|
Adafruit GFX Library
|
||||||
Adafruit SSD1306
|
Adafruit SSD1306
|
||||||
|
@ -23,4 +13,13 @@ lib_deps =
|
||||||
APRS-Decoder-Lib
|
APRS-Decoder-Lib
|
||||||
TinyGPSPlus
|
TinyGPSPlus
|
||||||
AXP202X_Library
|
AXP202X_Library
|
||||||
monitor_speed = 115200
|
|
||||||
|
[env:ttgo-t-beam-v0_7]
|
||||||
|
lib_deps =
|
||||||
|
Adafruit GFX Library
|
||||||
|
Adafruit SSD1306
|
||||||
|
LoRa
|
||||||
|
APRS-Decoder-Lib
|
||||||
|
APRS-IS-Lib
|
||||||
|
TinyGPSPlus
|
||||||
|
build_flags = -DARDUINO_T_Beam_V0_7
|
||||||
|
|
|
@ -1,21 +1,30 @@
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <LoRa.h>
|
#include <LoRa.h>
|
||||||
#include <APRS-Decoder.h>
|
#include <APRS-Decoder.h>
|
||||||
|
#if !defined(ARDUINO_T_Beam_V0_7)
|
||||||
#include <axp20x.h>
|
#include <axp20x.h>
|
||||||
|
#endif
|
||||||
#include <TinyGPS++.h>
|
#include <TinyGPS++.h>
|
||||||
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "display.h"
|
#include "display.h"
|
||||||
|
|
||||||
|
#if !defined(ARDUINO_T_Beam_V0_7)
|
||||||
#define RXPin 12
|
#define RXPin 12
|
||||||
#define TXPin 34
|
#define TXPin 34
|
||||||
|
#else
|
||||||
|
#define RXPin 15
|
||||||
|
#define TXPin 12
|
||||||
|
#endif
|
||||||
|
|
||||||
void setup_lora();
|
void setup_lora();
|
||||||
String create_lat_aprs(RawDegrees lat);
|
String create_lat_aprs(RawDegrees lat);
|
||||||
String create_long_aprs(RawDegrees lng);
|
String create_long_aprs(RawDegrees lng);
|
||||||
|
|
||||||
HardwareSerial ss(1);
|
HardwareSerial ss(1);
|
||||||
|
#if !defined(ARDUINO_T_Beam_V0_7)
|
||||||
AXP20X_Class axp;
|
AXP20X_Class axp;
|
||||||
|
#endif
|
||||||
TinyGPSPlus gps;
|
TinyGPSPlus gps;
|
||||||
int next_update = -1;
|
int next_update = -1;
|
||||||
|
|
||||||
|
@ -28,6 +37,7 @@ void setup()
|
||||||
Serial.println("[INFO] LoRa APRS Tracker by OE5BPA (Peter Buchegger)");
|
Serial.println("[INFO] LoRa APRS Tracker by OE5BPA (Peter Buchegger)");
|
||||||
show_display("OE5BPA", "LoRa APRS Tracker", "by Peter Buchegger", 2000);
|
show_display("OE5BPA", "LoRa APRS Tracker", "by Peter Buchegger", 2000);
|
||||||
|
|
||||||
|
#if !defined(ARDUINO_T_Beam_V0_7)
|
||||||
Wire.begin(SDA, SCL);
|
Wire.begin(SDA, SCL);
|
||||||
if (!axp.begin(Wire, AXP192_SLAVE_ADDRESS))
|
if (!axp.begin(Wire, AXP192_SLAVE_ADDRESS))
|
||||||
{
|
{
|
||||||
|
@ -39,6 +49,7 @@ void setup()
|
||||||
axp.setPowerOutPut(AXP192_LDO3, AXP202_ON); // GPS
|
axp.setPowerOutPut(AXP192_LDO3, AXP202_ON); // GPS
|
||||||
axp.setPowerOutPut(AXP192_DCDC1, AXP202_ON); // OLED
|
axp.setPowerOutPut(AXP192_DCDC1, AXP202_ON); // OLED
|
||||||
axp.setDCDC1Voltage(3300);
|
axp.setDCDC1Voltage(3300);
|
||||||
|
#endif
|
||||||
|
|
||||||
ss.begin(9600, SERIAL_8N1, TXPin, RXPin);
|
ss.begin(9600, SERIAL_8N1, TXPin, RXPin);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue