From b81de9fa55bcec6785d703f67283b7f0b79e1d3b Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 3 Feb 2018 05:37:53 -0800 Subject: [PATCH 1/3] Include SPI.h in all 101 examples Although the Arduino IDE will happily compile these sketches without this line, platformio will not, even after adding lib_ldf_mode = deep+ to platformio.ini. --- examples/101/CustomKeyboard/CustomKeyboard.ino | 1 + examples/101/EchoBot/EchoBot.ino | 1 + examples/101/FlashledBot/FlashledBot.ino | 1 + 3 files changed, 3 insertions(+) diff --git a/examples/101/CustomKeyboard/CustomKeyboard.ino b/examples/101/CustomKeyboard/CustomKeyboard.ino index aa680fc..7013599 100644 --- a/examples/101/CustomKeyboard/CustomKeyboard.ino +++ b/examples/101/CustomKeyboard/CustomKeyboard.ino @@ -5,6 +5,7 @@ * written by Brian Lough * *******************************************************************/ +#include #include #include #include diff --git a/examples/101/EchoBot/EchoBot.ino b/examples/101/EchoBot/EchoBot.ino index 3325778..c55d9f7 100644 --- a/examples/101/EchoBot/EchoBot.ino +++ b/examples/101/EchoBot/EchoBot.ino @@ -7,6 +7,7 @@ *******************************************************************/ + #include #include #include #include diff --git a/examples/101/FlashledBot/FlashledBot.ino b/examples/101/FlashledBot/FlashledBot.ino index b5aa01f..ad5ca5f 100644 --- a/examples/101/FlashledBot/FlashledBot.ino +++ b/examples/101/FlashledBot/FlashledBot.ino @@ -6,6 +6,7 @@ * adapted by Brian Lough * *******************************************************************/ + #include #include #include #include From d4c5fe4815e1f50afc547a46213cf4c010736474 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 3 Feb 2018 05:44:21 -0800 Subject: [PATCH 2/3] Only install library dependencies when necessary in Travis CI jobs In addition to making the build more efficient, this will become necessary when adding additional targets to the Travis CI build as the unnecessarily installed WiFiManager conflicts with the WiFi101 library dependency. --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4c8080d..1271951 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ env: - SCRIPT=platformioSingle EXAMPLE_NAME=ReplyKeyboardMarkup EXAMPLE_FOLDER=/CustomKeyboard/ BOARDTYPE=ESP8266 BOARD=d1_mini - SCRIPT=platformioSingle EXAMPLE_NAME=InlineKeyboardMarkup EXAMPLE_FOLDER=/CustomKeyboard/ BOARDTYPE=ESP8266 BOARD=d1_mini - SCRIPT=platformioSingle EXAMPLE_NAME=FlashLED EXAMPLE_FOLDER=/ BOARDTYPE=ESP8266 BOARD=d1_mini - - SCRIPT=platformioSingle EXAMPLE_NAME=UsingWiFiManager EXAMPLE_FOLDER=/ BOARDTYPE=ESP8266 BOARD=d1_mini + - SCRIPT=platformioSingle EXAMPLE_NAME=UsingWiFiManager EXAMPLE_FOLDER=/ BOARDTYPE=ESP8266 BOARD=d1_mini LIBRARYDEPENDENCY=567 - SCRIPT=platformioSingle EXAMPLE_NAME=BulkMessages EXAMPLE_FOLDER=/ BOARDTYPE=ESP8266 BOARD=d1_mini - SCRIPT=platformioSingle EXAMPLE_NAME=PhotoFromSD EXAMPLE_FOLDER=/SendPhoto/ BOARDTYPE=ESP8266 BOARD=d1_mini - SCRIPT=platformioSingle EXAMPLE_NAME=PhotoFromURL EXAMPLE_FOLDER=/SendPhoto/ BOARDTYPE=ESP8266 BOARD=d1_mini @@ -41,6 +41,6 @@ install: # # http://platformio.org/lib/show/64/ArduinoJson - platformio lib -g install 64 - # http://platformio.org/lib/show/567/WifiManager - - platformio lib -g install 567 + # Install sketch-specific library dependency + - if [[ "$LIBRARYDEPENDENCY" != "" ]]; then platformio lib -g install "$LIBRARYDEPENDENCY"; fi script: scripts/travis/$SCRIPT.sh From a9b06f42c2a202750fb84df3753c00c4fe631884 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 3 Feb 2018 05:47:41 -0800 Subject: [PATCH 3/3] Use Travis CI to test the 101 example sketches Compile the 101 example sketches for the MKR1000 and Mega 2560 boards. The MKR1000 has onboard support for the WiFi101 library and the Mega 2560 is the recommended AVR board for use with the WiFi 101 shield. --- .travis.yml | 8 ++++++++ platformio.ini | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1271951..b73078f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,14 @@ env: - SCRIPT=platformioSingle EXAMPLE_NAME=ChatAction EXAMPLE_FOLDER=/ BOARDTYPE=ESP32 BOARD=esp32dev - SCRIPT=platformioSingle EXAMPLE_NAME=LongPoll EXAMPLE_FOLDER=/ BOARDTYPE=ESP32 BOARD=esp32dev + - SCRIPT=platformioSingle EXAMPLE_NAME=CustomKeyboard EXAMPLE_FOLDER=/ BOARDTYPE=101 BOARD=mkr1000USB LIBRARYDEPENDENCY=299 + - SCRIPT=platformioSingle EXAMPLE_NAME=EchoBot EXAMPLE_FOLDER=/ BOARDTYPE=101 BOARD=mkr1000USB LIBRARYDEPENDENCY=299 + - SCRIPT=platformioSingle EXAMPLE_NAME=FlashledBot EXAMPLE_FOLDER=/ BOARDTYPE=101 BOARD=mkr1000USB LIBRARYDEPENDENCY=299 + + - SCRIPT=platformioSingle EXAMPLE_NAME=CustomKeyboard EXAMPLE_FOLDER=/ BOARDTYPE=101 BOARD=megaatmega2560 LIBRARYDEPENDENCY=299 + - SCRIPT=platformioSingle EXAMPLE_NAME=EchoBot EXAMPLE_FOLDER=/ BOARDTYPE=101 BOARD=megaatmega2560 LIBRARYDEPENDENCY=299 + - SCRIPT=platformioSingle EXAMPLE_NAME=FlashledBot EXAMPLE_FOLDER=/ BOARDTYPE=101 BOARD=megaatmega2560 LIBRARYDEPENDENCY=299 + install: - pip install -U platformio diff --git a/platformio.ini b/platformio.ini index 987c62e..8292956 100644 --- a/platformio.ini +++ b/platformio.ini @@ -21,3 +21,15 @@ platform = espressif32_stage board = esp32dev framework = arduino lib_deps = ${common.lib_deps_external} + +[env:mkr1000USB] +platform = atmelsam +board = mkr1000USB +framework = arduino +lib_deps = WiFi101, ${common.lib_deps_external} + +[env:megaatmega2560] +platform = atmelavr +board = megaatmega2560 +framework = arduino +lib_deps = WiFi101, ${common.lib_deps_external}