diff --git a/examples/advancedExample/platformio.ini b/examples/advancedExample/platformio.ini new file mode 100644 index 0000000..edc51d1 --- /dev/null +++ b/examples/advancedExample/platformio.ini @@ -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 + + diff --git a/examples/basicExample/platformio.ini b/examples/basicExample/platformio.ini index 551922d..edc51d1 100644 --- a/examples/basicExample/platformio.ini +++ b/examples/basicExample/platformio.ini @@ -10,7 +10,7 @@ [platformio] src_dir = . -lib_dir = ../.. +;lib_dir = ../.. [debug] debug = ;-D DEBUG_NTPCLIENT @@ -18,8 +18,8 @@ debug = ;-D DEBUG_NTPCLIENT [env] upload_speed = 921600 monitor_speed = 115200 -;lib_deps = -; ESPNtpClient +lib_deps = + ESPNtpClient [env:esp32] platform = espressif32 diff --git a/examples/ledFlasher/platformio.ini b/examples/ledFlasher/platformio.ini new file mode 100644 index 0000000..edc51d1 --- /dev/null +++ b/examples/ledFlasher/platformio.ini @@ -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 + + diff --git a/library.json b/library.json index 81595eb..cb217d5 100644 --- a/library.json +++ b/library.json @@ -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" + ] + }] }