1
+ // Code generated by Arduino IoT Cloud, DO NOT EDIT.
2
+
1
3
#include <ArduinoIoTCloud.h>
2
4
#include <Arduino_ConnectionHandler.h>
3
- #include "aws_config .h"
5
+ #include "arduino_secrets .h"
4
6
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)
8
9
9
10
void onLedChange ();
10
11
@@ -18,28 +19,5 @@ void initProperties() {
18
19
ArduinoCloud .addProperty (seconds , Permission ::Read ).publishOnChange (1 );
19
20
}
20
21
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