We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31f86f4 commit a30a1c1Copy full SHA for a30a1c1
examples/Actuators/RelaySwitch/RelaySwitch.ino
@@ -49,4 +49,13 @@ CAYENNE_IN(VIRTUAL_CHANNEL)
49
else {
50
digitalWrite(ACTUATOR_PIN, LOW);
51
}
52
-}
+}
53
+
54
+// This function is called at intervals to send data to Cayenne and keep the device online.
55
+// Will create a temporary green widget on Channel 0, make it permanent by clicking on '+'.
56
+CAYENNE_OUT(0)
57
+{
58
+ CAYENNE_LOG("Send data for Virtual Channel 0");
59
+ // This command writes the device's uptime in seconds to the Virtual Channel.
60
+ Cayenne.virtualWrite(0, millis() / 1000);
61
0 commit comments