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.
Fork of Thingspeak by
Diff: Thingspeak.cpp
- Revision:
- 0:d98f92bb426f
diff -r 000000000000 -r d98f92bb426f Thingspeak.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Thingspeak.cpp Mon Feb 12 10:18:15 2018 +0000
@@ -0,0 +1,11 @@
+#include "mbed.h"
+#include "Thingspeak.h"
+
+HTTPResult Thingspeak::PostDataToChannel(char* channelWriteAPIKey, int fieldNumber, int fieldValue){
+ char url[100];
+ sprintf( url, "https://api.thingspeak.com/update?api_key=%s&field%d=%d ", channelWriteAPIKey, fieldNumber, fieldValue);
+ HTTPMap map;
+ HTTPText text("", 1);
+ map.put("", "");
+ return _http.post(url, map, &text,1);
+}
