Skip to content

Commit c94929b

Browse files
Added information about sync options
1 parent 320ec58 commit c94929b

File tree

1 file changed

+5
-0
lines changed
  • content/arduino-cloud/03.cloud-interface/00.sketches

1 file changed

+5
-0
lines changed

content/arduino-cloud/03.cloud-interface/00.sketches/sketches.md

+5
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ The sketch file is generated with a set of additional Cloud-specific methods inc
7070
- `ArduinoCloud.begin()` starts the library with the preferred connection (e.g. Wi-Fi® or LoRaWAN®).
7171
- `ArduinoCloud.update()` - synchronizes all data between the board and the Arduino Cloud.
7272

73+
There are a few different options when it comes to synchronization of your cloud sketch:
74+
- `MOST_RECENT_WINS` - Best for real-time applications where the latest data should always be used, regardless of source.
75+
- `CLOUD_WINS` - Useful when the cloud holds critical configurations or settings that should always be enforced on the device.
76+
- `DEVICE_WINS` - Used when the device generates important real-time data (sensor readings) that should always be preserved over cloud updates.
77+
7378
In addition, any variable created with a read/write permission will also generate a callback function that executes whenever the variable's value changes.
7479
- If you create a variable called `test`, the function will render as `void onTestChange(){}`
7580

0 commit comments

Comments
 (0)