diff --git a/.gitignore b/.gitignore index 55f017b647d2f2124c1ad1a9cacde7719ab6847a..95b4ce9c50f7cb542044183a97fae1a8fa30915c 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 0000000000000000000000000000000000000000..cc39e38c3259486c869e221f5e16864fdc6a758b --- /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 cf9ab95b564886220666d526405008cfd6374d09..b7168f382848b69ce889d303dfc50801db1594f4 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); }