2
2
#include <Arduino_ConnectionHandler.h>
3
3
#include "arduino_secrets.h"
4
4
5
- #if !(defined(BOARD_HAS_WIFI ) || defined(BOARD_HAS_GSM ) || defined(BOARD_HAS_LORA ) || \
6
- defined(BOARD_HAS_NB ) || defined(BOARD_HAS_ETHERNET ) || defined(BOARD_HAS_CATM1_NBIOT ))
7
- #error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
5
+ #if !(defined(HAS_TCP ) || defined(HAS_LORA ))
6
+ #error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
8
7
#endif
9
8
10
9
#if defined(BOARD_HAS_SECRET_KEY )
@@ -27,7 +26,7 @@ void initProperties() {
27
26
ArduinoCloud .setBoardId (BOARD_ID );
28
27
ArduinoCloud .setSecretDeviceKey (SECRET_DEVICE_KEY );
29
28
#endif
30
- #if defined(BOARD_HAS_WIFI ) || defined( BOARD_HAS_GSM ) || defined( BOARD_HAS_NB ) || defined( BOARD_HAS_ETHERNET ) || defined( BOARD_HAS_CATM1_NBIOT )
29
+ #if defined(HAS_TCP )
31
30
ArduinoCloud .addProperty (switchButton , Permission ::Write );
32
31
ArduinoCloud .addProperty (oneShot , Permission ::ReadWrite );
33
32
ArduinoCloud .addProperty (minute , Permission ::ReadWrite );
@@ -36,7 +35,7 @@ void initProperties() {
36
35
ArduinoCloud .addProperty (weekly , Permission ::ReadWrite );
37
36
ArduinoCloud .addProperty (monthly , Permission ::ReadWrite );
38
37
ArduinoCloud .addProperty (yearly , Permission ::ReadWrite );
39
- #elif defined(BOARD_HAS_LORA )
38
+ #elif defined(HAS_LORA )
40
39
ArduinoCloud .addProperty (switchButton , 1 , Permission ::Write );
41
40
#endif
42
41
}
@@ -56,4 +55,6 @@ void initProperties() {
56
55
//EthernetConnectionHandler ArduinoIoTPreferredConnection;
57
56
/* Manual mode. It will fallback in DHCP mode if SECRET_OPTIONAL_IP is invalid or equal to "0.0.0.0" */
58
57
EthernetConnectionHandler ArduinoIoTPreferredConnection (SECRET_OPTIONAL_IP , SECRET_OPTIONAL_DNS , SECRET_OPTIONAL_GATEWAY , SECRET_OPTIONAL_NETMASK );
58
+ #elif defined(BOARD_HAS_CELLULAR )
59
+ CellularConnectionHandler ArduinoIoTPreferredConnection (SECRET_PIN , SECRET_APN , SECRET_LOGIN , SECRET_PASS );
59
60
#endif
0 commit comments