1+ // Code generated by Arduino IoT Cloud, DO NOT EDIT.
2+
13#include <ArduinoIoTCloud.h>
24#include <Arduino_ConnectionHandler.h>
3- #include "aws_config .h"
5+ #include "arduino_secrets .h"
46
5- #if !(defined(BOARD_STM32H7 ))
6- #error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
7- #endif
7+ const char SSID [] = SECRET_SSID ; // Network SSID (name)
8+ const char PASS [] = SECRET_OPTIONAL_PASS ; // Network password (use for WPA, or use as key for WEP)
89
910void onLedChange ();
1011
@@ -18,28 +19,5 @@ void initProperties() {
1819 ArduinoCloud .addProperty (seconds , Permission ::Read ).publishOnChange (1 );
1920}
2021
21- //#define USE_ETHERNET_DHCP_CONNECTION
22- //#define USE_ETHERNET_MANUAL_CONNECTION
23- #define USE_WIFI_CONNECTION
24- //#define USE_CATM1_NBIOT_CONNECTION
25-
26- #include "arduino_secrets.h"
27-
28- #if defined(BOARD_HAS_ETHERNET ) && defined(USE_ETHERNET_CONNECTION )
29- /* DHCP mode */
30- EthernetConnectionHandler ArduinoIoTPreferredConnection ;
31- EthernetConnectionHandler AWSIoTPreferredConnection ;
32- #elif defined(BOARD_HAS_ETHERNET ) && defined(USE_ETHERNET_MANUAL_CONNECTION )
33- /* Manual mode. It will fallback in DHCP mode if SECRET_OPTIONAL_IP is invalid or equal to "0.0.0.0" */
34- EthernetConnectionHandler ArduinoIoTPreferredConnection (SECRET_ETH_OPTIONAL_IP , SECRET_ETH_OPTIONAL_DNS , SECRET_ETH_OPTIONAL_GATEWAY , SECRET_ETH_OPTIONAL_NETMASK );
35- EthernetConnectionHandler AWSIoTPreferredConnection (SECRET_ETH_OPTIONAL_IP , SECRET_ETH_OPTIONAL_DNS , SECRET_ETH_OPTIONAL_GATEWAY , SECRET_ETH_OPTIONAL_NETMASK );
36- #elif defined(BOARD_HAS_WIFI ) && defined(USE_WIFI_CONNECTION )
37- WiFiConnectionHandler ArduinoIoTPreferredConnection (SECRET_WIFI_SSID , SECRET_WIFI_PASS );
38- WiFiConnectionHandler AWSIoTPreferredConnection (SECRET_WIFI_SSID , SECRET_WIFI_PASS );
39- #elif defined(BOARD_HAS_CATM1_NBIOT ) && defined(USE_CATM1_NBIOT_CONNECTION )
40- CatM1ConnectionHandler ArduinoIoTPreferredConnection (SECRET_CATM_PIN , SECRET_CATM_APN , SECRET_CATM_LOGIN , SECRET_CATM_PASS );
41- CatM1ConnectionHandler AWSIoTPreferredConnection (SECRET_CATM_PIN , SECRET_CATM_APN , SECRET_CATM_LOGIN , SECRET_CATM_PASS );
42- #endif
43-
44- BearSSLClient sslClientAWS (AWSIoTPreferredConnection .getClient ());
45- MqttClient mqttClientAWS (sslClientAWS );
22+ WiFiConnectionHandler ArduinoIoTPreferredConnection (SECRET_SSID , SECRET_OPTIONAL_PASS );
23+
0 commit comments