Skip to content

Commit

Permalink
Add platformio ini file to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
gmag11 committed Nov 26, 2020
1 parent 16e02a7 commit 402de87
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 4 deletions.
36 changes: 36 additions & 0 deletions examples/advancedExample/platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
; 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

[platformio]
src_dir = .
;lib_dir = ../..

[debug]
debug = ;-D DEBUG_NTPCLIENT

[env]
upload_speed = 921600
monitor_speed = 115200
lib_deps =
ESPNtpClient

[env:esp32]
platform = espressif32
board = esp32dev
build_flags = -std=c++11 ${debug.debug}
framework = arduino

[env:esp8266]
platform = espressif8266
board = esp12e
build_flags = -std=c++11 -D PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191122 ${debug.debug}
framework = arduino


6 changes: 3 additions & 3 deletions examples/basicExample/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@

[platformio]
src_dir = .
lib_dir = ../..
;lib_dir = ../..

[debug]
debug = ;-D DEBUG_NTPCLIENT

[env]
upload_speed = 921600
monitor_speed = 115200
;lib_deps =
; ESPNtpClient
lib_deps =
ESPNtpClient

[env:esp32]
platform = espressif32
Expand Down
36 changes: 36 additions & 0 deletions examples/ledFlasher/platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
; 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

[platformio]
src_dir = .
;lib_dir = ../..

[debug]
debug = ;-D DEBUG_NTPCLIENT

[env]
upload_speed = 921600
monitor_speed = 115200
lib_deps =
ESPNtpClient

[env:esp32]
platform = espressif32
board = esp32dev
build_flags = -std=c++11 ${debug.debug}
framework = arduino

[env:esp8266]
platform = espressif8266
board = esp12e
build_flags = -std=c++11 -D PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191122 ${debug.debug}
framework = arduino


24 changes: 23 additions & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,28 @@
"type": "git",
"url": "https://github.com/gmag11/ESPNtpClient.git"
},
"examples": ["examples/basicExample/basicExample.ino", "examples/advancedExample/advancedExample.ino"]
"examples": [{
"name": "Basic example",
"base": "examples/basicExample",
"files": [
"platformio.ini",
"basicExample.ino"
]
},{
"name": "Advanced example",
"base": "examples/advancedExample",
"files": [
"platformio.ini",
"advancedExample.ino"
]
},
{
"name": "LED Flasher",
"base": "examples/ledFlasher",
"files": [
"platformio.ini",
"ledFlasher.ino"
]
}]
}

0 comments on commit 402de87

Please sign in to comment.