Skip to content

Commit 5846a2a

Browse files
committed
Adding support for MKR NB 1500 to 'ArduinoIoTCloud_LED_switch'
1 parent d165764 commit 5846a2a

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

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

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 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

0 commit comments

Comments
 (0)