1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 | ;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:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
board_build.f_cpu = 160000000L
board_build.f_flash = 80000000L
board_build.flash_mode = qio
build_flags =
-DWEBSOCKET_DISABLED=true
lib_deps =
ArduinoJson@~5.13.4
https://github.com/mcci-catena/arduino-lmic.git
monitor_speed = 115200
monitor_port = ${common.port}
upload_speed = 921600
upload_port = ${common.port}
;;; uncomment above line, and comment next line to use uploading via com port
; upload_port=192.168.43.221
[common]
port=COM29
|
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 | #include <Arduino.h>
#include "Modules/modules.h"
void setup()
{
// put your setup code here, to run once:
Serial.begin(115200);
wifi_ota_setup();
lwic_setup();
}
void loop()
{
// put your main code here, to run repeatedly:
wifi_ota_loop();
lwic_loop();
}
|
Git repository link for codes :- Repo