The library is designed to connect the MBED boards to the ThingSpeak IoT cloud.

Fork of Thingspeak by Reza Mashayekhi

Committer:
mreda
Date:
Mon Feb 12 17:34:47 2018 +0000
Revision:
1:0c196a572d6b
Parent:
0:d98f92bb426f
ThingSpeak_Library_v1_postToChannel

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mreda 0:d98f92bb426f 1 #include "mbed.h"
mreda 0:d98f92bb426f 2 #include "Thingspeak.h"
mreda 0:d98f92bb426f 3
mreda 0:d98f92bb426f 4 HTTPResult Thingspeak::PostDataToChannel(char* channelWriteAPIKey, int fieldNumber, int fieldValue){
mreda 0:d98f92bb426f 5 char url[100];
mreda 0:d98f92bb426f 6 sprintf( url, "https://api.thingspeak.com/update?api_key=%s&field%d=%d ", channelWriteAPIKey, fieldNumber, fieldValue);
mreda 0:d98f92bb426f 7 HTTPMap map;
mreda 0:d98f92bb426f 8 HTTPText text("", 1);
mreda 0:d98f92bb426f 9 map.put("", "");
mreda 0:d98f92bb426f 10 return _http.post(url, map, &text,1);
mreda 0:d98f92bb426f 11 }