From 5f08266c7114dde9f0da65466ce8afcd135b62f3 Mon Sep 17 00:00:00 2001 From: Tiaan-Botes Date: Mon, 28 Oct 2024 09:25:15 +0100 Subject: [PATCH] uploading working gps gps wporking on 28/10/2024 --- .vscode/c_cpp_properties.json | 22 ++++++++++++++++++++ LoRaWAN-HelloWorld-lmic/src/main.cpp | 2 +- LoRaWAN-HelloWorld-radiolib/platformio.ini | 24 +++++++++++++++++++++- 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .vscode/c_cpp_properties.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..dba3ca4 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,22 @@ +{ + "configurations": [ + { + "name": "Win32", + "includePath": [ + "${workspaceFolder}/**", + "C:/Users/tbote/.platformio/packages/framework-arduinoespressif32/libraries/Preferences/src" + ], + "defines": [ + "_DEBUG", + "UNICODE", + "_UNICODE" + ], + "windowsSdkVersion": "10.0.22621.0", + "compilerPath": "cl.exe", + "cStandard": "c17", + "cppStandard": "c++17", + "intelliSenseMode": "windows-msvc-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/LoRaWAN-HelloWorld-lmic/src/main.cpp b/LoRaWAN-HelloWorld-lmic/src/main.cpp index e085e7e..14133e8 100644 --- a/LoRaWAN-HelloWorld-lmic/src/main.cpp +++ b/LoRaWAN-HelloWorld-lmic/src/main.cpp @@ -108,7 +108,7 @@ static osjob_t sendjob; // Schedule TX every this many seconds (might become longer due to duty // cycle limitations). -const unsigned TX_INTERVAL = 60; +const unsigned TX_INTERVAL = 20; // Pin mapping // const lmic_pinmap lmic_pins = { diff --git a/LoRaWAN-HelloWorld-radiolib/platformio.ini b/LoRaWAN-HelloWorld-radiolib/platformio.ini index 4ab2bf0..1b53334 100644 --- a/LoRaWAN-HelloWorld-radiolib/platformio.ini +++ b/LoRaWAN-HelloWorld-radiolib/platformio.ini @@ -16,11 +16,13 @@ default_envs = ; ttn_sandbox_lorawan_v110_sx1276_radiolib_esp32dev_voc_radiolib_tmp_v110_1 ; ttn_sandbox_lorawan_v104_sx1276_radiolib_esp32dev_voc_radiolib_tmp_1 ; Solar - ttn_sandbox_lorawan_v110_sx1276_radiolib_esp32dev_voc_experiment_1_110 ; Experiment +; ttn_sandbox_lorawan_v110_sx1276_radiolib_esp32dev_voc_experiment_1_110 ; Experiment + nexus_LoraWan_connection_ESP32mini_v1 ; ttn_sandbox_lorawan_v110_sx1276_radiolib_esp32dev_plantpal ; ttn_sandbox_lorawan_v110_sx1276_radiolib_wemos_d1_mini32_voc_radiolib_tmp_v110_1 ; ttn_sandbox_lorawan_v104_sx1276_radiolib_wemos_d1_mini32_voc_radiolib_tmp_1 + ; Use radiolib via github [radiolib] lib_deps = https://github.com/PCo-IoT-2024/RadioLib.git#GAIT2024 @@ -62,6 +64,11 @@ build_flags = -D RADIOLIB_LORAWAN_APP_KEY="0x14, 0x70, 0xFC, 0x7A, 0xD8, 0x20, 0x9E, 0xFF, 0x48, 0xA9, 0xC7, 0xCD, 0xD6, 0x12, 0x4C, 0xF8" ; msb -D RADIOLIB_LORAWAN_NWK_KEY="0x95, 0xBF, 0x84, 0x5A, 0xAA, 0x41, 0x6C, 0x96, 0xC8, 0x3B, 0xA8, 0x3C, 0x94, 0x81, 0x7C, 0x36" ; msb +[Nexus-connection] +build_flags = +-D RADIOLIB_LORAWAN_DEV_EUI="0x70B3D57ED006B486" ; direct + -D RADIOLIB_LORAWAN_APP_KEY="0x8E, 0x36, 0xAE, 0x6B, 0xDB, 0xD7, 0xC1, 0x33, 0xF9, 0x1B, 0x12, 0x74, 0x2B, 0x56, 0x59, 0x3D" ; msb + -D RADIOLIB_LORAWAN_NWK_KEY="0x30, 0x34, 0x3C, 0x49, 0x96, 0x26, 0x0B, 0x30, 0x48, 0x12, 0xD1, 0x55, 0x13, 0x5C, 0x16, 0xEC" ; msb [message_104] build_flags = -D RADIOLIB_LORAWAN_PAYLOAD="\"RadioLib v1.0.4 device: Waiting for GPS\"" @@ -231,6 +238,21 @@ build_flags = ${message_104.build_flags} -D RADIOLIB_LORA_UPLINK_INTERVAL_SECONDS="(1UL * 60UL)" +[env:nexus_LoraWan_connection_ESP32mini_v1] +platform = espressif32 +board = esp32dev +framework = arduino +upload_speed = 115200 +lib_deps = + ${ttn_sandbox_lorawan_sx1276_radiolib_esp32.lib_deps} + ${gps.lib_deps} +build_flags = + ${eu868.build_flags} + ${ttn_sandbox_lorawan_sx1276_radiolib_esp32.build_flags} + ${Nexus-connection.build_flags} + ${message_110.build_flags} + -D RADIOLIB_LORA_UPLINK_INTERVAL_SECONDS="(1UL * 60UL)" + ;[env:d1_mini] ;platform = espressif8266 ;board = d1_mini