22#elif defined(BOARD_HAS_GSM )
33#elif defined(BOARD_HAS_LORA )
44#elif defined(BOARD_HAS_NB )
5+ #elif defined(BOARD_HAS_ETHERNET )
56#else
67 #error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
78#endif
@@ -21,7 +22,7 @@ void initProperties() {
2122 ArduinoCloud .setBoardId (BOARD_ID );
2223 ArduinoCloud .setSecretDeviceKey (SECRET_DEVICE_KEY );
2324#endif
24- #if defined(BOARD_HAS_WIFI ) || defined(BOARD_HAS_GSM ) || defined(BOARD_HAS_NB )
25+ #if defined(BOARD_HAS_WIFI ) || defined(BOARD_HAS_GSM ) || defined(BOARD_HAS_NB ) || defined( BOARD_HAS_ETHERNET )
2526 ArduinoCloud .addProperty (led , Permission ::Write ).onUpdate (onLedChange );
2627 ArduinoCloud .addProperty (potentiometer , Permission ::Read ).publishOnChange (10 );
2728 ArduinoCloud .addProperty (seconds , Permission ::Read ).publishOnChange (1 );
@@ -32,7 +33,12 @@ void initProperties() {
3233#endif
3334}
3435
35- #if defined(BOARD_HAS_WIFI )
36+ #if defined(BOARD_HAS_ETHERNET )
37+ /* DHCP mode */
38+ //EthernetConnectionHandler ArduinoIoTPreferredConnection;
39+ /* Manual mode. It will fallback in DHCP mode if SECRET_OPTIONAL_IP is invalid or equal to "0.0.0.0" */
40+ EthernetConnectionHandler ArduinoIoTPreferredConnection (SECRET_OPTIONAL_IP , SECRET_OPTIONAL_DNS , SECRET_OPTIONAL_GATEWAY , SECRET_OPTIONAL_NETMASK );
41+ #elif defined(BOARD_HAS_WIFI )
3642 WiFiConnectionHandler ArduinoIoTPreferredConnection (SECRET_SSID , SECRET_PASS );
3743#elif defined(BOARD_HAS_GSM )
3844 GSMConnectionHandler ArduinoIoTPreferredConnection (SECRET_PIN , SECRET_APN , SECRET_LOGIN , SECRET_PASS );
0 commit comments