You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/cloud/iot-cloud/tutorials/02.technical-reference/iot-cloud-tech-ref.md
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -513,12 +513,9 @@ The example below shows a basic code generated in the `thingProperties.h` file a
513
513
***Please note: for READ & WRITE variables a callback function (in this case called `onVariableName01Change()`) is automatically generated in sketch. This will allow for writing commands inside the function to trigger actions whenever the value is changed from the cloud.***
const char PASS[] = SECRET_PASS; // Network password (use for WPA, or use as key for WEP)
524
521
@@ -529,16 +526,23 @@ CloudTemperature Variable_Name_02; // declare a Cloud specific temperature varia
529
526
530
527
void initProperties(){
531
528
532
-
ArduinoCloud.setThingId(THING_ID);
533
529
ArduinoCloud.addProperty(Variable_Name_01, READWRITE, ON_CHANGE, onVariableName01Change); // linking the read & write variable with its function and updating it on change
534
530
ArduinoCloud.addProperty(Variable_Name_02, READ, 10 * SECONDS, NULL); // setting up the read only variable and updating it every 10 seconds
535
531
536
532
}
537
533
538
534
WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS); // setting up the network name and password chosen in the Network configuration
535
+
```
536
+
537
+
***As of 2022/02/09 the `thingProperties.h` no longer contains your Thing ID. If you have created a Thing prior to this date, simply update your Thing and your `thingProperties.h` will automatically be updated. You can see the lines that were removed in the snippet below:***
ArduinoCloud.setThingId(THING_ID); //previously located inside initProperties()
540
543
```
541
544
545
+
542
546
### sketch.ino
543
547
544
548
This file includes the main Arduino sketch that can be **edited and uploaded to the device**. The sketch includes the `thingProperties.h` file, the `setup()` and `loop()` functions, and an empty function for every **Read & Write** variable. The code below is a basic example of an auto generated code in the sketch file, using the same variables from the previous example displayed in `thingProperties.h` section.
@@ -585,7 +589,7 @@ Uploading a sketch through the Arduino IoT Cloud can be achieved in two ways, ei
585
589
586
590
The full editor allows for more control over the code and its libraries and provides access to all files included in the sketch, as well as more editing and sharing options.
587
591
588
-
***Please note: the status of the connection to the Network and Arduino IoT Cloud may be checked by opening the **Serial Monitor** after uploading a sketch. If the `while(!Serial);` loop is included in the `setup()` function, the code would not execute before opening the **Serial Monitor**.***
592
+
***Please note: the status of the connection to the Network and Arduino IoT Cloud may be checked by opening the Serial Monitor after uploading a sketch. If the `while(!Serial);` loop is included in the `setup()` function, the code would not execute before opening the Serial Monitor.***
0 commit comments