Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: C12832 IBMIoTF LM75B MMA7660
Revision 5:48b6090e0df1, committed 2017-05-31
- Comitter:
- lokeshhk
- Date:
- Wed May 31 10:03:52 2017 +0000
- Parent:
- 4:a416fef97faa
- Commit message:
- Enabled sending real device events back
Changed in this revision
| src/Main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/src/Main.cpp Tue May 30 06:59:13 2017 +0000
+++ b/src/Main.cpp Wed May 31 10:03:52 2017 +0000
@@ -86,16 +86,7 @@
int count = 0;
sprintf(buf,"{\"d\":{\"myName\":\"IoT mbed\"}}");
- //Comment below stmts when sending real device events in following section
- while(1){
- client->publishEvent("blink", buf);
- client->yield(1);
- if(!client->isConnected())
- break;
- }
-
- //Uncomment the below commented section to send real device events
- /*while(1) {
+ while(1) {
if (++count == 100) {
logMessage("\r\n");
@@ -126,7 +117,7 @@
led2 = !led2;
client->yield(10); // allow the MQTT client to receive messages
- }*/
+ }
if(client->isConnected()){
logMessage("Disconnecting the client from server...\r\n");