Skip to content

Commit 6e12ebd

Browse files
committed
use cmd instead of req whenever we know we are not awaiting a reply
1 parent 82b2dc0 commit 6e12ebd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/Example0_LibrarylessCommunication/Example0_LibrarylessCommunication.ino

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,16 @@ void setup()
5757
// This command (required) causes the data to be delivered to the Project on notehub.io that has claimed
5858
// this Product ID. (see above)
5959
if (myProductID[0]) {
60-
txRxPinsSerial.println("{\"req\":\"hub.set\",\"product\":\"" myProductID "\"}");
60+
txRxPinsSerial.println("{\"cmd\":\"hub.set\",\"product\":\"" myProductID "\"}");
6161
}
6262
// This command determines how often the Notecard connects to the service. If "continuous" the Notecard
6363
// immediately establishes a session with the service at notehub.io, and keeps it active continuously.
6464
// Because of the power requirements of a continuous connection, a battery powered device would instead
6565
// only sample its sensors occasionally, and would only upload to the service on a periodic basis.
6666
#if myLiveDemo
67-
txRxPinsSerial.println("{\"req\":\"hub.set\",\"mode\":\"continuous\"}");
67+
txRxPinsSerial.println("{\"cmd\":\"hub.set\",\"mode\":\"continuous\"}");
6868
#else
69-
txRxPinsSerial.println("{\"req\":\"hub.set\",\"mode\":\"periodic\",\"outbound\":60}");
69+
txRxPinsSerial.println("{\"cmd\":\"hub.set\",\"mode\":\"periodic\",\"outbound\":60}");
7070
#endif
7171

7272
}
@@ -96,7 +96,7 @@ void loop()
9696
char message[150];
9797
snprintf(message, sizeof(message),
9898
"{"
99-
"\"req\":\"note.add\""
99+
"\"cmd\":\"note.add\""
100100
","
101101
"\"sync\":true"
102102
","

0 commit comments

Comments
 (0)