Skip to content

Commit a15ab1d

Browse files
committed
Nicla_IoT_Bridge: use READ only things
1 parent 13ee5c9 commit a15ab1d

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

examples/Nicla_IoT_Bridge/Nicla_IoT_Bridge.ino

+1-8
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,4 @@ void loop() {
5959
}
6060

6161
ArduinoCloud.update();
62-
}
63-
64-
void onTempChange() {
65-
}
66-
67-
68-
void onSecondsChange() {
69-
}
62+
}

examples/Nicla_IoT_Bridge/thingProperties.h

+2-5
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,14 @@ const char THING_ID[] = "";
88
const char SSID[] = SECRET_SSID; // Network SSID (name)
99
const char PASS[] = SECRET_PASS; // Network password (use for WPA, or use as key for WEP)
1010

11-
void onTempChange();
12-
void onSecondsChange();
13-
1411
float temp;
1512
int seconds;
1613

1714
void initProperties(){
1815

1916
ArduinoCloud.setThingId(THING_ID);
20-
ArduinoCloud.addProperty(temp, READWRITE, ON_CHANGE, onTempChange);
21-
ArduinoCloud.addProperty(seconds, READWRITE, ON_CHANGE, onSecondsChange);
17+
ArduinoCloud.addProperty(temp, READ, 1 * SECONDS, NULL);
18+
ArduinoCloud.addProperty(seconds, READ, 1 * SECONDS, NULL);
2219

2320
}
2421

0 commit comments

Comments
 (0)