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: EthernetNetIf mbed
Diff: main.cpp
- Revision:
- 0:97f465b60dea
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun Jan 30 13:17:35 2011 +0000
@@ -0,0 +1,39 @@
+#include "mbed.h"
+#include "EthernetNetIf.h"
+#include "HTTPClient.h"
+
+EthernetNetIf eth;
+
+int main() {
+
+ printf("Init\n");
+
+ printf("\r\nSetting up...\r\n");
+ EthernetErr ethErr = eth.setup();
+ if(ethErr)
+ {
+ printf("Error %d in setup.\n", ethErr);
+ return -1;
+ }
+ printf("\r\nSetup OK\r\n");
+
+ HTTPClient prowl;
+
+ HTTPMap msg;
+ msg["apikey"] = ""; //your unique code you have to make on the website
+ msg["providerkey"] = "";
+ msg["priority"] = "0";
+ msg["application"] = "Mbed";
+ msg["event"] = "status";
+ msg["description"] = "Message sent from mbed";
+
+ HTTPResult r = prowl.post("https://prowl.weks.net/publicapi/add", msg, NULL);
+ if( r == HTTP_OK ){
+ printf("Push notification sent with success!\n");
+ }else{
+ printf("Problem during pushing, return code %d\n", r);
+ }
+
+ return 0;
+
+}