22#include <Arduino_ConnectionHandler.h>
33#include "arduino_secrets.h"
44
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"
87#endif
98
109#if defined(BOARD_HAS_SECRET_KEY )
@@ -27,7 +26,7 @@ void initProperties() {
2726 ArduinoCloud .setBoardId (BOARD_ID );
2827 ArduinoCloud .setSecretDeviceKey (SECRET_DEVICE_KEY );
2928#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 )
3130 ArduinoCloud .addProperty (switchButton , Permission ::Write );
3231 ArduinoCloud .addProperty (oneShot , Permission ::ReadWrite );
3332 ArduinoCloud .addProperty (minute , Permission ::ReadWrite );
@@ -36,7 +35,7 @@ void initProperties() {
3635 ArduinoCloud .addProperty (weekly , Permission ::ReadWrite );
3736 ArduinoCloud .addProperty (monthly , Permission ::ReadWrite );
3837 ArduinoCloud .addProperty (yearly , Permission ::ReadWrite );
39- #elif defined(BOARD_HAS_LORA )
38+ #elif defined(HAS_LORA )
4039 ArduinoCloud .addProperty (switchButton , 1 , Permission ::Write );
4140#endif
4241}
@@ -56,4 +55,6 @@ void initProperties() {
5655 //EthernetConnectionHandler ArduinoIoTPreferredConnection;
5756 /* Manual mode. It will fallback in DHCP mode if SECRET_OPTIONAL_IP is invalid or equal to "0.0.0.0" */
5857 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 );
5960#endif
0 commit comments