From 8fe1b25684c8334cf3406e018b37d85185db5c58 Mon Sep 17 00:00:00 2001 From: Jan Grewe <jan@faked.org> Date: Sun, 26 Jul 2020 02:03:48 +0200 Subject: [PATCH] add platformio.ini --- .gitignore | 1 - platformio.ini | 27 +++++++++++++++++++++++++++ src/main.cpp | 16 ++++++++-------- 3 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 platformio.ini diff --git a/.gitignore b/.gitignore index 55f017b..95b4ce9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ .pio .vscode .travis.yml -platformio.ini BikeBeam.code-workspace src/config.h diff --git a/platformio.ini b/platformio.ini new file mode 100644 index 0000000..cc39e38 --- /dev/null +++ b/platformio.ini @@ -0,0 +1,27 @@ +; PlatformIO Project Configuration File +; +; 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 + +[env:ttgo-t-beam] +platform = espressif32 +board = ttgo-t-beam +framework = arduino +upload_port = COM4 +monitor_port = COM4 +monitor_speed = 115200 +build_flags = + -D ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS + -D ARDUINO_LMIC_CFG_NETWORK_TTN + -D CFG_sx1276_radio + -D CFG_eu868 + -D LMIC_DEBUG_LEVEL=2 +lib_deps = + AXP202X_Library@1.1.2 + TinyGPSPlus@1.0.2 + MCCI Arduino LoRaWAN Library@0.8.0 diff --git a/src/main.cpp b/src/main.cpp index cf9ab95..b7168f3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -78,14 +78,14 @@ void setupPower() { Serial.println("AXP192 Begin FAIL"); } - axp.setPowerOutPut(AXP192_DCDC1, AXP202_OFF); // OLED, etc.: off - axp.setPowerOutPut(AXP192_DCDC2, AXP202_OFF); // N/C: off - axp.setPowerOutPut(AXP192_DCDC3, AXP202_ON); // ESP32: on - axp.setPowerOutPut(AXP192_LDO2, AXP202_ON); // LORA: on - axp.setPowerOutPut(AXP192_LDO3, AXP202_ON); // GPS: on - axp.setDCDC3Voltage(3300); // ESP32: 3.3V - axp.setLDO2Voltage(3300); // LORA: 3.3V - axp.setLDO3Voltage(3300); // GPS: 3.3V + axp.setPowerOutPut(AXP192_DCDC1, AXP202_OFF); // OLED : off + axp.setPowerOutPut(AXP192_DCDC2, AXP202_OFF); // N/C : off + axp.setPowerOutPut(AXP192_DCDC3, AXP202_ON); // ESP32 : on + axp.setPowerOutPut(AXP192_LDO2, AXP202_ON); // LORA : on + axp.setPowerOutPut(AXP192_LDO3, AXP202_ON); // GPS : on + axp.setDCDC3Voltage(3300); // ESP32 : 3.3V + axp.setLDO2Voltage(3300); // LORA : 3.3V + axp.setLDO3Voltage(3300); // GPS : 3.3V axp.setChgLEDMode(AXP20X_LED_OFF); } -- GitLab