@@ -137,35 +137,30 @@ Because "Manual Devices" do not automatically generate a downloadable sketch, yo
1371375 . Paste the following code into ` arduino_secrets.h ` and fill in your details:
138138
139139 ``` cpp
140- #define SECRET_SSID "YOUR_WIFI_SSID"
141- #define SECRET_OPTIONAL_PASS "YOUR_WIFI_PASSWORD"
142- #define SECRET_DEVICE_LOGIN_NAME "YOUR_DEVICE_ID" // From Step 1
143- #define SECRET_DEVICE_KEY "YOUR_SECRET_KEY" // From Step 1
140+ #define SECRET_WIFI_SSID "YOUR_WIFI_SSID"
141+ #define SECRET_WIFI_PASS "YOUR_WIFI_PASSWORD"
142+ #define SECRET_DEVICE_ID "YOUR_DEVICE_ID" // From Step 1
143+ #define SECRET_DEVICE_KEY "YOUR_SECRET_KEY" // From Step 1
144144 ```
145145
1461466 . Create another new tab named `thingProperties.h` and paste the following configuration code:
147147
148148 ```cpp
149149 #include < ArduinoIoTCloud.h>
150- #include < Arduino_ConnectionHandler.h>
151150 #include " arduino_secrets.h"
152151
153- const char SSID[] = SECRET_SSID;
154- const char PASS[] = SECRET_OPTIONAL_PASS;
155- const char DEVICE_LOGIN_NAME[] = SECRET_DEVICE_LOGIN_NAME;
156- const char DEVICE_KEY[] = SECRET_DEVICE_KEY;
157-
158152 void onLedChange ();
159153
160154 bool led;
161155
156+ WiFiConnectionHandler ArduinoIoTPreferredConnection (SECRET_WIFI_SSID, SECRET_WIFI_PASS);
157+
162158 void initProperties(){
163- ArduinoCloud.setBoardId(DEVICE_LOGIN_NAME);
164- ArduinoCloud.setSecretDeviceKey(DEVICE_KEY);
165159 ArduinoCloud.addProperty(led, READWRITE, ON_CHANGE, onLedChange);
160+
161+ ArduinoCloud.setBoardId(SECRET_DEVICE_ID);
162+ ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY);
166163 }
167-
168- WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);
169164 ```
170165
1711667 . Finally, paste the main application code into your ` .ino ` file:
0 commit comments