Skip to content

Commit bb22b87

Browse files
committed
Edge Control: fix compile example workflow
1 parent 60e8a88 commit bb22b87

File tree

12 files changed

+36
-122
lines changed

12 files changed

+36
-122
lines changed

examples/ArduinoIoTCloud-Advanced/arduino_secrets.h

+2-10
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#define SECRET_DEVICE_KEY "my-device-password"
1515
#endif
1616

17-
/* MKR GSM 1400 */
18-
#if defined(BOARD_HAS_GSM)
17+
/* MKR GSM 1400 */ /* MKR NB 1500 */ /* Portenta CAT.M1/NB IoT GNSS Shield */
18+
#if defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_CATM1_NBIOT)
1919
#define SECRET_PIN ""
2020
#define SECRET_APN ""
2121
#define SECRET_LOGIN ""
@@ -28,14 +28,6 @@
2828
#define SECRET_APP_KEY ""
2929
#endif
3030

31-
/* MKR NB 1500 */
32-
#if defined(BOARD_HAS_NB)
33-
#define SECRET_PIN ""
34-
#define SECRET_APN ""
35-
#define SECRET_LOGIN ""
36-
#define SECRET_PASS ""
37-
#endif
38-
3931
/* Portenta H7 + Ethernet shield */
4032
#if defined(BOARD_HAS_ETHERNET)
4133
#define SECRET_OPTIONAL_IP ""

examples/ArduinoIoTCloud-Advanced/thingProperties.h

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
#if defined(BOARD_HAS_WIFI)
2-
#elif defined(BOARD_HAS_GSM)
3-
#elif defined(BOARD_HAS_LORA)
4-
#elif defined(BOARD_HAS_NB)
5-
#elif defined(BOARD_HAS_ETHERNET)
6-
#else
1+
#if !(defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_LORA) || \
2+
defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET) || defined(BOARD_HAS_CATM1_NBIOT))
73
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
84
#endif
95

@@ -23,7 +19,7 @@ void initProperties() {
2319
ArduinoCloud.setBoardId(BOARD_ID);
2420
ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY);
2521
#endif
26-
#if defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB)
22+
#if defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET) || defined(BOARD_HAS_CATM1_NBIOT)
2723
ArduinoCloud.addProperty(switchButton, WRITE, ON_CHANGE, onSwitchButtonChange);
2824
ArduinoCloud.addProperty(location, READ, ON_CHANGE);
2925
ArduinoCloud.addProperty(color, READWRITE, ON_CHANGE, onColorChange);
@@ -42,6 +38,8 @@ void initProperties() {
4238
LoRaConnectionHandler ArduinoIoTPreferredConnection(SECRET_APP_EUI, SECRET_APP_KEY, _lora_band::EU868, NULL, _lora_class::CLASS_A);
4339
#elif defined(BOARD_HAS_NB)
4440
NBConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
41+
#elif defined(BOARD_HAS_CATM1_NBIOT)
42+
CatM1ConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
4543
#elif defined(BOARD_HAS_ETHERNET)
4644
/* DHCP mode */
4745
//EthernetConnectionHandler ArduinoIoTPreferredConnection;

examples/ArduinoIoTCloud-Basic/arduino_secrets.h

+2-10
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#define SECRET_DEVICE_KEY "my-device-password"
1515
#endif
1616

17-
/* MKR GSM 1400 */
18-
#if defined(BOARD_HAS_GSM)
17+
/* MKR GSM 1400 */ /* MKR NB 1500 */ /* Portenta CAT.M1/NB IoT GNSS Shield */
18+
#if defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_CATM1_NBIOT)
1919
#define SECRET_PIN ""
2020
#define SECRET_APN ""
2121
#define SECRET_LOGIN ""
@@ -28,14 +28,6 @@
2828
#define SECRET_APP_KEY ""
2929
#endif
3030

31-
/* MKR NB 1500 */
32-
#if defined(BOARD_HAS_NB)
33-
#define SECRET_PIN ""
34-
#define SECRET_APN ""
35-
#define SECRET_LOGIN ""
36-
#define SECRET_PASS ""
37-
#endif
38-
3931
/* Portenta H7 + Ethernet shield */
4032
#if defined(BOARD_HAS_ETHERNET)
4133
#define SECRET_OPTIONAL_IP ""

examples/ArduinoIoTCloud-Basic/thingProperties.h

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
#if defined(BOARD_HAS_WIFI)
2-
#elif defined(BOARD_HAS_GSM)
3-
#elif defined(BOARD_HAS_LORA)
4-
#elif defined(BOARD_HAS_NB)
5-
#elif defined(BOARD_HAS_ETHERNET)
6-
#else
1+
#if !(defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_LORA) || \
2+
defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET) || defined(BOARD_HAS_CATM1_NBIOT))
73
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
84
#endif
95

@@ -22,7 +18,7 @@ void initProperties() {
2218
ArduinoCloud.setBoardId(BOARD_ID);
2319
ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY);
2420
#endif
25-
#if defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET)
21+
#if defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET) || defined(BOARD_HAS_CATM1_NBIOT)
2622
ArduinoCloud.addProperty(led, Permission::Write).onUpdate(onLedChange);
2723
ArduinoCloud.addProperty(potentiometer, Permission::Read).publishOnChange(10);
2824
ArduinoCloud.addProperty(seconds, Permission::Read).publishOnChange(1);
@@ -46,4 +42,6 @@ void initProperties() {
4642
LoRaConnectionHandler ArduinoIoTPreferredConnection(SECRET_APP_EUI, SECRET_APP_KEY, _lora_band::EU868, NULL, _lora_class::CLASS_A);
4743
#elif defined(BOARD_HAS_NB)
4844
NBConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
45+
#elif defined(BOARD_HAS_CATM1_NBIOT)
46+
CatM1ConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
4947
#endif

examples/ArduinoIoTCloud-Callbacks/arduino_secrets.h

+2-10
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#define SECRET_DEVICE_KEY "my-device-password"
1515
#endif
1616

17-
/* MKR GSM 1400 */
18-
#if defined(BOARD_HAS_GSM)
17+
/* MKR GSM 1400 */ /* MKR NB 1500 */ /* Portenta CAT.M1/NB IoT GNSS Shield */
18+
#if defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_CATM1_NBIOT)
1919
#define SECRET_PIN ""
2020
#define SECRET_APN ""
2121
#define SECRET_LOGIN ""
@@ -28,14 +28,6 @@
2828
#define SECRET_APP_KEY ""
2929
#endif
3030

31-
/* MKR NB 1500 */
32-
#if defined(BOARD_HAS_NB)
33-
#define SECRET_PIN ""
34-
#define SECRET_APN ""
35-
#define SECRET_LOGIN ""
36-
#define SECRET_PASS ""
37-
#endif
38-
3931
/* Portenta H7 + Ethernet shield */
4032
#if defined(BOARD_HAS_ETHERNET)
4133
#define SECRET_OPTIONAL_IP ""

examples/ArduinoIoTCloud-Callbacks/thingProperties.h

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
#if defined(BOARD_HAS_WIFI)
2-
#elif defined(BOARD_HAS_GSM)
3-
#elif defined(BOARD_HAS_LORA)
4-
#elif defined(BOARD_HAS_NB)
5-
#elif defined(BOARD_HAS_ETHERNET)
6-
#else
1+
#if !(defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_LORA) || \
2+
defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET) || defined(BOARD_HAS_CATM1_NBIOT))
73
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
84
#endif
95

@@ -26,6 +22,8 @@ void initProperties() {
2622
LoRaConnectionHandler ArduinoIoTPreferredConnection(SECRET_APP_EUI, SECRET_APP_KEY, _lora_band::EU868, NULL, _lora_class::CLASS_A);
2723
#elif defined(BOARD_HAS_NB)
2824
NBConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
25+
#elif defined(BOARD_HAS_CATM1_NBIOT)
26+
CatM1ConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
2927
#elif defined(BOARD_HAS_ETHERNET)
3028
/* DHCP mode */
3129
//EthernetConnectionHandler ArduinoIoTPreferredConnection;

examples/ArduinoIoTCloud-DeferredOTA/arduino_secrets.h

-22
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,6 @@
1414
#define SECRET_DEVICE_KEY "my-device-password"
1515
#endif
1616

17-
/* MKR GSM 1400 */
18-
#if defined(BOARD_HAS_GSM)
19-
#define SECRET_PIN ""
20-
#define SECRET_APN ""
21-
#define SECRET_LOGIN ""
22-
#define SECRET_PASS ""
23-
#endif
24-
25-
/* MKR WAN 1300/1310 */
26-
#if defined(BOARD_HAS_LORA)
27-
#define SECRET_APP_EUI ""
28-
#define SECRET_APP_KEY ""
29-
#endif
30-
31-
/* MKR NB 1500 */
32-
#if defined(BOARD_HAS_NB)
33-
#define SECRET_PIN ""
34-
#define SECRET_APN ""
35-
#define SECRET_LOGIN ""
36-
#define SECRET_PASS ""
37-
#endif
38-
3917
/* Portenta H7 + Ethernet shield */
4018
#if defined(BOARD_HAS_ETHERNET)
4119
#define SECRET_OPTIONAL_IP ""

examples/ArduinoIoTCloud-DeferredOTA/thingProperties.h

+2-16
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
#if defined(BOARD_HAS_WIFI)
2-
#elif defined(BOARD_HAS_GSM)
3-
#elif defined(BOARD_HAS_LORA)
4-
#elif defined(BOARD_HAS_NB)
5-
#elif defined(BOARD_HAS_ETHERNET)
6-
#else
1+
#if !(defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_ETHERNET))
72
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
83
#endif
94

@@ -20,21 +15,12 @@ void initProperties() {
2015
ArduinoCloud.setBoardId(BOARD_ID);
2116
ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY);
2217
#endif
23-
#if defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET)
18+
2419
ArduinoCloud.addProperty(led, Permission::Write).onUpdate(onLedChange);
25-
#elif defined(BOARD_HAS_LORA)
26-
ArduinoCloud.addProperty(led, 1, READWRITE, ON_CHANGE, onLedChange);
27-
#endif
2820
}
2921

3022
#if defined(BOARD_HAS_WIFI)
3123
WiFiConnectionHandler ArduinoIoTPreferredConnection(SECRET_SSID, SECRET_PASS);
32-
#elif defined(BOARD_HAS_GSM)
33-
GSMConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
34-
#elif defined(BOARD_HAS_LORA)
35-
LoRaConnectionHandler ArduinoIoTPreferredConnection(SECRET_APP_EUI, SECRET_APP_KEY, _lora_band::EU868, NULL, _lora_class::CLASS_A);
36-
#elif defined(BOARD_HAS_NB)
37-
NBConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
3824
#elif defined(BOARD_HAS_ETHERNET)
3925
/* DHCP mode */
4026
//EthernetConnectionHandler ArduinoIoTPreferredConnection;

examples/ArduinoIoTCloud-Schedule/arduino_secrets.h

+2-10
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#define SECRET_DEVICE_KEY "my-device-password"
1515
#endif
1616

17-
/* MKR GSM 1400 */
18-
#if defined(BOARD_HAS_GSM)
17+
/* MKR GSM 1400 */ /* MKR NB 1500 */ /* Portenta CAT.M1/NB IoT GNSS Shield */
18+
#if defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_CATM1_NBIOT)
1919
#define SECRET_PIN ""
2020
#define SECRET_APN ""
2121
#define SECRET_LOGIN ""
@@ -28,14 +28,6 @@
2828
#define SECRET_APP_KEY ""
2929
#endif
3030

31-
/* MKR NB 1500 */
32-
#if defined(BOARD_HAS_NB)
33-
#define SECRET_PIN ""
34-
#define SECRET_APN ""
35-
#define SECRET_LOGIN ""
36-
#define SECRET_PASS ""
37-
#endif
38-
3931
/* Portenta H7 + Ethernet shield */
4032
#if defined(BOARD_HAS_ETHERNET)
4133
#define SECRET_OPTIONAL_IP ""

examples/ArduinoIoTCloud-Schedule/thingProperties.h

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
#if defined(BOARD_HAS_WIFI)
2-
#elif defined(BOARD_HAS_GSM)
3-
#elif defined(BOARD_HAS_LORA)
4-
#elif defined(BOARD_HAS_NB)
5-
#elif defined(BOARD_HAS_ETHERNET)
6-
#else
1+
#if !(defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_LORA) || \
2+
defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET) || defined(BOARD_HAS_CATM1_NBIOT))
73
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
84
#endif
95

@@ -27,7 +23,7 @@ void initProperties() {
2723
ArduinoCloud.setBoardId(BOARD_ID);
2824
ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY);
2925
#endif
30-
#if defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET)
26+
#if defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET) || defined(BOARD_HAS_CATM1_NBIOT)
3127
ArduinoCloud.addProperty(switchButton, WRITE, ON_CHANGE);
3228
ArduinoCloud.addProperty(oneShot, READWRITE, ON_CHANGE);
3329
ArduinoCloud.addProperty(minute, READWRITE, ON_CHANGE);
@@ -49,6 +45,8 @@ void initProperties() {
4945
LoRaConnectionHandler ArduinoIoTPreferredConnection(SECRET_APP_EUI, SECRET_APP_KEY, _lora_band::EU868, NULL, _lora_class::CLASS_A);
5046
#elif defined(BOARD_HAS_NB)
5147
NBConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
48+
#elif defined(BOARD_HAS_CATM1_NBIOT)
49+
CatM1ConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
5250
#elif defined(BOARD_HAS_ETHERNET)
5351
/* DHCP mode */
5452
//EthernetConnectionHandler ArduinoIoTPreferredConnection;

examples/utility/ArduinoIoTCloud_Travis_CI/arduino_secrets.h

+2-10
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#define SECRET_DEVICE_KEY "my-device-password"
1515
#endif
1616

17-
/* MKR GSM 1400 */
18-
#if defined(BOARD_HAS_GSM)
17+
/* MKR GSM 1400 */ /* MKR NB 1500 */ /* Portenta CAT.M1/NB IoT GNSS Shield */
18+
#if defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_CATM1_NBIOT)
1919
#define SECRET_PIN ""
2020
#define SECRET_APN ""
2121
#define SECRET_LOGIN ""
@@ -28,14 +28,6 @@
2828
#define SECRET_APP_KEY ""
2929
#endif
3030

31-
/* MKR NB 1500 */
32-
#if defined(BOARD_HAS_NB)
33-
#define SECRET_PIN ""
34-
#define SECRET_APN ""
35-
#define SECRET_LOGIN ""
36-
#define SECRET_PASS ""
37-
#endif
38-
3931
/* Portenta H7 + Ethernet shield */
4032
#if defined(BOARD_HAS_ETHERNET)
4133
#define SECRET_OPTIONAL_IP ""

examples/utility/ArduinoIoTCloud_Travis_CI/thingProperties.h

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
#if defined(BOARD_HAS_WIFI)
2-
#elif defined(BOARD_HAS_GSM)
3-
#elif defined(BOARD_HAS_LORA)
4-
#elif defined(BOARD_HAS_NB)
5-
#elif defined(BOARD_HAS_ETHERNET)
6-
#else
1+
#if !(defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_LORA) || \
2+
defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET) || defined(BOARD_HAS_CATM1_NBIOT))
73
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
84
#endif
95

@@ -58,6 +54,8 @@ String str_property_8;
5854
LoRaConnectionHandler ArduinoIoTPreferredConnection(SECRET_APP_EUI, SECRET_APP_KEY, EU868);
5955
#elif defined(BOARD_HAS_NB)
6056
NBConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
57+
#elif defined(BOARD_HAS_CATM1_NBIOT)
58+
CatM1ConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
6159
#elif defined(BOARD_HAS_ETHERNET)
6260
/* DHCP mode */
6361
//EthernetConnectionHandler ArduinoIoTPreferredConnection;
@@ -77,7 +75,7 @@ void onStringPropertyChange();
7775
/******************************************************************************
7876
FUNCTIONS
7977
******************************************************************************/
80-
#if defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined (BOARD_HAS_NB)
78+
#if defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined (BOARD_HAS_NB) || defined (BOARD_HAS_CATM1_NBIOT)
8179
void initProperties() {
8280
#if defined(BOARD_HAS_SECRET_KEY)
8381
ArduinoCloud.setBoardId(BOARD_ID);

0 commit comments

Comments
 (0)