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: HTTPClient NVIC_set_all_priorities cc3000_hostdriver_mbedsocket mbed
Revision 1:f35cc7e300f7, committed 2013-10-07
- Comitter:
- Kojto
- Date:
- Mon Oct 07 18:42:23 2013 +0200
- Parent:
- 0:5aa9273cb749
- Child:
- 2:0ceaeaa53a81
- Commit message:
- Again, comments and \r
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Oct 07 16:33:28 2013 +0000
+++ b/main.cpp Mon Oct 07 18:42:23 2013 +0200
@@ -106,7 +106,7 @@
}
/**
- * \brief Websocket demo
+ * \brief Twitter demo
* \param none
* \return int
*/
@@ -115,7 +115,7 @@
pc.baud(115200);
wifi.start(0);
- printf("cc3000 Websocket demo. \r\n");
+ printf("cc3000 twitter demo. \r\n");
print_cc3000_info();
printf("Attempting SSID Connection. \r\n");
@@ -154,19 +154,19 @@
HTTPMap map;
HTTPText inText(str, 512);
map.put("status", "I am tweeting from mbed with cc3000.");
-
- printf("\nTrying to post data...\n");
+
+ printf("\r\nTrying to post data...\r\n");
twitter.basicAuth("username", "secret"); //We use basic authentication, replace with you account's parameters
int ret = twitter.post("http://api.supertweet.net/1.1/statuses/update.json", map, &inText);
if (!ret)
{
- printf("Executed POST successfully - read %d characters\n", strlen(str));
- printf("Result: %s\n", str);
+ printf("Executed POST successfully - read %d characters\r\n", strlen(str));
+ printf("Result: %s \r\n", str);
}
else
{
- printf("Error - ret = %d - HTTP return code = %d\n", ret, twitter.getHTTPResponseCode());
+ printf("Error - ret = %d - HTTP return code = %d \r\n", ret, twitter.getHTTPResponseCode());
}
-
- printf("Demo completed. \r\n");
+
+ printf("Twitter demo completed.\r\n");
}