From d1657649db243af7c3267263679f2c6c38caab00 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Wed, 18 Mar 2020 13:31:26 +0100 Subject: [PATCH 1/4] Adding MKR NB 1500 as built target for CI --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dd5de9f71..2b836f9c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,8 @@ matrix: - BOARD="arduino:samd:mkrgsm1400" - env: - BOARD="arduino:samd:mkrwan1300" + - env: + - BOARD="arduino:samd:mkrnb1500" - env: - BOARD="esp8266:esp8266:huzzah" - env: @@ -53,6 +55,7 @@ before_install: - installLibrary arduino-libraries/ArduinoMqttClient - installLibrary arduino-libraries/MKRGSM - installLibrary arduino-libraries/MKRWAN + - installLibrary arduino-libraries/MKRNB - installLibrary arduino-libraries/RTCZero - installLibrary arduino-libraries/WiFi101 - installLibrary arduino-libraries/WiFiNINA @@ -75,7 +78,7 @@ install: - ln -s $PWD $HOME/Arduino/libraries/. script: - | - if [ "$BOARD" == "arduino:samd:mkr1000" ] || [ "$BOARD" == "arduino:samd:mkrwifi1010" ] || [ "$BOARD" == "arduino:samd:mkrgsm1400" ]; then + if [ "$BOARD" == "arduino:samd:mkr1000" ] || [ "$BOARD" == "arduino:samd:mkrwifi1010" ] || [ "$BOARD" == "arduino:samd:mkrgsm1400" ] || [ "$BOARD" == "arduino:samd:mkrnb1500" ]; then buildSketch \ "ArduinoIoTCloud_LED_switch" \ "ArduinoIoTCloud_Travis_CI" \ From 5846a2ad097d7f9db1038672f89051425c868180 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Wed, 18 Mar 2020 13:44:14 +0100 Subject: [PATCH 2/4] Adding support for MKR NB 1500 to 'ArduinoIoTCloud_LED_switch' --- examples/ArduinoIoTCloud_LED_switch/arduino_secrets.h | 8 ++++++++ examples/ArduinoIoTCloud_LED_switch/thingProperties.h | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/examples/ArduinoIoTCloud_LED_switch/arduino_secrets.h b/examples/ArduinoIoTCloud_LED_switch/arduino_secrets.h index 9a5f514b9..020482cfc 100644 --- a/examples/ArduinoIoTCloud_LED_switch/arduino_secrets.h +++ b/examples/ArduinoIoTCloud_LED_switch/arduino_secrets.h @@ -19,3 +19,11 @@ #define SECRET_APP_EUI "" #define SECRET_APP_KEY "" #endif + +/* MKR NB 1500 */ +#if defined(BOARD_HAS_NB) + #define SECRET_PIN "" + #define SECRET_APN "" + #define SECRET_LOGIN "" + #define SECRET_PASS "" +#endif diff --git a/examples/ArduinoIoTCloud_LED_switch/thingProperties.h b/examples/ArduinoIoTCloud_LED_switch/thingProperties.h index 10f13bd4f..3a6ccc1b1 100644 --- a/examples/ArduinoIoTCloud_LED_switch/thingProperties.h +++ b/examples/ArduinoIoTCloud_LED_switch/thingProperties.h @@ -4,8 +4,9 @@ #if defined(BOARD_HAS_WIFI) #elif defined(BOARD_HAS_GSM) #elif defined(BOARD_HAS_LORA) +#elif defined(BOARD_HAS_NB) #else - #error "Arduino IoT Cloud currently only supports MKR1000, MKR WiFi 1010 and MKR GSM 1400" + #error "Arduino IoT Cloud currently only supports MKR1000, MKR WiFi 1010, MKR NB 1500 and MKR GSM 1400" #endif @@ -35,4 +36,6 @@ void initProperties() { GSMConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS); #elif defined(BOARD_HAS_LORA) LoRaConnectionHandler ArduinoIoTPreferredConnection(SECRET_APP_EUI, SECRET_APP_KEY, _lora_band::EU868, _lora_class::CLASS_A); +#elif defined(BOARD_HAS_NB) + NBConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS); #endif From 1f93f72a32d27d3defdfec90e149f487600e597c Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Wed, 18 Mar 2020 13:47:22 +0100 Subject: [PATCH 3/4] Adding support for MKR NB 1500 to 'ArduinoIoTCloud_Travis_CI' --- examples/ArduinoIoTCloud_Travis_CI/arduino_secrets.h | 7 +++++++ examples/ArduinoIoTCloud_Travis_CI/thingProperties.h | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/examples/ArduinoIoTCloud_Travis_CI/arduino_secrets.h b/examples/ArduinoIoTCloud_Travis_CI/arduino_secrets.h index fd08461a0..020482cfc 100644 --- a/examples/ArduinoIoTCloud_Travis_CI/arduino_secrets.h +++ b/examples/ArduinoIoTCloud_Travis_CI/arduino_secrets.h @@ -20,3 +20,10 @@ #define SECRET_APP_KEY "" #endif +/* MKR NB 1500 */ +#if defined(BOARD_HAS_NB) + #define SECRET_PIN "" + #define SECRET_APN "" + #define SECRET_LOGIN "" + #define SECRET_PASS "" +#endif diff --git a/examples/ArduinoIoTCloud_Travis_CI/thingProperties.h b/examples/ArduinoIoTCloud_Travis_CI/thingProperties.h index 5f31fd386..50be2985b 100644 --- a/examples/ArduinoIoTCloud_Travis_CI/thingProperties.h +++ b/examples/ArduinoIoTCloud_Travis_CI/thingProperties.h @@ -8,8 +8,9 @@ #if defined(BOARD_HAS_WIFI) #elif defined(BOARD_HAS_GSM) #elif defined(BOARD_HAS_LORA) +#elif defined(BOARD_HAS_NB) #else - #error "Arduino IoT Cloud currently only supports MKR1000, MKR WiFi 1010, MKR GSM 1400 and MKR WAN 1300/1310" + #error "Arduino IoT Cloud currently only supports MKR1000, MKR WiFi 1010, MKR NB 1500 and MKR GSM 1400" #endif /****************************************************************************** @@ -60,6 +61,8 @@ String str_property_8; GSMConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS); #elif defined(BOARD_HAS_LORA) LoRaConnectionHandler ArduinoIoTPreferredConnection(SECRET_APP_EUI, SECRET_APP_KEY, EU868); +#elif defined(BOARD_HAS_NB) + NBConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS); #endif /****************************************************************************** @@ -74,7 +77,7 @@ void onStringPropertyChange(); /****************************************************************************** FUNCTIONS ******************************************************************************/ -#if defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) +#if defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined (BOARD_HAS_NB) void initProperties() { ArduinoCloud.setThingId(THING_ID); From 89e32b0bc42703b2471322d4d123503ac3521a55 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Thu, 19 Mar 2020 07:09:02 +0100 Subject: [PATCH 4/4] Readding MKR WAN 1300/1310 to error message --- examples/ArduinoIoTCloud_LED_switch/thingProperties.h | 2 +- examples/ArduinoIoTCloud_Travis_CI/thingProperties.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ArduinoIoTCloud_LED_switch/thingProperties.h b/examples/ArduinoIoTCloud_LED_switch/thingProperties.h index 3a6ccc1b1..6b7986922 100644 --- a/examples/ArduinoIoTCloud_LED_switch/thingProperties.h +++ b/examples/ArduinoIoTCloud_LED_switch/thingProperties.h @@ -6,7 +6,7 @@ #elif defined(BOARD_HAS_LORA) #elif defined(BOARD_HAS_NB) #else - #error "Arduino IoT Cloud currently only supports MKR1000, MKR WiFi 1010, MKR NB 1500 and MKR GSM 1400" + #error "Arduino IoT Cloud currently only supports MKR1000, MKR WiFi 1010, MKR WAN 1300/1310, MKR NB 1500 and MKR GSM 1400" #endif diff --git a/examples/ArduinoIoTCloud_Travis_CI/thingProperties.h b/examples/ArduinoIoTCloud_Travis_CI/thingProperties.h index 50be2985b..02ce29c2f 100644 --- a/examples/ArduinoIoTCloud_Travis_CI/thingProperties.h +++ b/examples/ArduinoIoTCloud_Travis_CI/thingProperties.h @@ -10,7 +10,7 @@ #elif defined(BOARD_HAS_LORA) #elif defined(BOARD_HAS_NB) #else - #error "Arduino IoT Cloud currently only supports MKR1000, MKR WiFi 1010, MKR NB 1500 and MKR GSM 1400" + #error "Arduino IoT Cloud currently only supports MKR1000, MKR WiFi 1010, MKR WAN 1300/1310, MKR NB 1500 and MKR GSM 1400" #endif /******************************************************************************