Skip to content

Commit 18d2b93

Browse files
authored
Adding MKR NB 1500 as built target for CI (#101)
* Adding MKR NB 1500 as built target for CI * Adding support for MKR NB 1500 to 'ArduinoIoTCloud_LED_switch' * Adding support for MKR NB 1500 to 'ArduinoIoTCloud_Travis_CI' * Readding MKR WAN 1300/1310 to error message
1 parent b519e91 commit 18d2b93

File tree

5 files changed

+28
-4
lines changed

5 files changed

+28
-4
lines changed

Diff for: .travis.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ matrix:
99
- BOARD="arduino:samd:mkrgsm1400"
1010
- env:
1111
- BOARD="arduino:samd:mkrwan1300"
12+
- env:
13+
- BOARD="arduino:samd:mkrnb1500"
1214
- env:
1315
- BOARD="esp8266:esp8266:huzzah"
1416
- env:
@@ -53,6 +55,7 @@ before_install:
5355
- installLibrary arduino-libraries/ArduinoMqttClient
5456
- installLibrary arduino-libraries/MKRGSM
5557
- installLibrary arduino-libraries/MKRWAN
58+
- installLibrary arduino-libraries/MKRNB
5659
- installLibrary arduino-libraries/RTCZero
5760
- installLibrary arduino-libraries/WiFi101
5861
- installLibrary arduino-libraries/WiFiNINA
@@ -75,7 +78,7 @@ install:
7578
- ln -s $PWD $HOME/Arduino/libraries/.
7679
script:
7780
- |
78-
if [ "$BOARD" == "arduino:samd:mkr1000" ] || [ "$BOARD" == "arduino:samd:mkrwifi1010" ] || [ "$BOARD" == "arduino:samd:mkrgsm1400" ]; then
81+
if [ "$BOARD" == "arduino:samd:mkr1000" ] || [ "$BOARD" == "arduino:samd:mkrwifi1010" ] || [ "$BOARD" == "arduino:samd:mkrgsm1400" ] || [ "$BOARD" == "arduino:samd:mkrnb1500" ]; then
7982
buildSketch \
8083
"ArduinoIoTCloud_LED_switch" \
8184
"ArduinoIoTCloud_Travis_CI" \

Diff for: examples/ArduinoIoTCloud_LED_switch/arduino_secrets.h

+8
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,11 @@
1919
#define SECRET_APP_EUI ""
2020
#define SECRET_APP_KEY ""
2121
#endif
22+
23+
/* MKR NB 1500 */
24+
#if defined(BOARD_HAS_NB)
25+
#define SECRET_PIN ""
26+
#define SECRET_APN ""
27+
#define SECRET_LOGIN ""
28+
#define SECRET_PASS ""
29+
#endif

Diff for: examples/ArduinoIoTCloud_LED_switch/thingProperties.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
#if defined(BOARD_HAS_WIFI)
55
#elif defined(BOARD_HAS_GSM)
66
#elif defined(BOARD_HAS_LORA)
7+
#elif defined(BOARD_HAS_NB)
78
#else
8-
#error "Arduino IoT Cloud currently only supports MKR1000, MKR WiFi 1010 and MKR GSM 1400"
9+
#error "Arduino IoT Cloud currently only supports MKR1000, MKR WiFi 1010, MKR WAN 1300/1310, MKR NB 1500 and MKR GSM 1400"
910
#endif
1011

1112

@@ -35,4 +36,6 @@ void initProperties() {
3536
GSMConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
3637
#elif defined(BOARD_HAS_LORA)
3738
LoRaConnectionHandler ArduinoIoTPreferredConnection(SECRET_APP_EUI, SECRET_APP_KEY, _lora_band::EU868, _lora_class::CLASS_A);
39+
#elif defined(BOARD_HAS_NB)
40+
NBConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
3841
#endif

Diff for: examples/ArduinoIoTCloud_Travis_CI/arduino_secrets.h

+7
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,10 @@
2020
#define SECRET_APP_KEY ""
2121
#endif
2222

23+
/* MKR NB 1500 */
24+
#if defined(BOARD_HAS_NB)
25+
#define SECRET_PIN ""
26+
#define SECRET_APN ""
27+
#define SECRET_LOGIN ""
28+
#define SECRET_PASS ""
29+
#endif

Diff for: examples/ArduinoIoTCloud_Travis_CI/thingProperties.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
#if defined(BOARD_HAS_WIFI)
99
#elif defined(BOARD_HAS_GSM)
1010
#elif defined(BOARD_HAS_LORA)
11+
#elif defined(BOARD_HAS_NB)
1112
#else
12-
#error "Arduino IoT Cloud currently only supports MKR1000, MKR WiFi 1010, MKR GSM 1400 and MKR WAN 1300/1310"
13+
#error "Arduino IoT Cloud currently only supports MKR1000, MKR WiFi 1010, MKR WAN 1300/1310, MKR NB 1500 and MKR GSM 1400"
1314
#endif
1415

1516
/******************************************************************************
@@ -60,6 +61,8 @@ String str_property_8;
6061
GSMConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
6162
#elif defined(BOARD_HAS_LORA)
6263
LoRaConnectionHandler ArduinoIoTPreferredConnection(SECRET_APP_EUI, SECRET_APP_KEY, EU868);
64+
#elif defined(BOARD_HAS_NB)
65+
NBConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
6366
#endif
6467

6568
/******************************************************************************
@@ -74,7 +77,7 @@ void onStringPropertyChange();
7477
/******************************************************************************
7578
FUNCTIONS
7679
******************************************************************************/
77-
#if defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM)
80+
#if defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined (BOARD_HAS_NB)
7881
void initProperties() {
7982
ArduinoCloud.setThingId(THING_ID);
8083

0 commit comments

Comments
 (0)