ThingSpeak has a TalkBack function but, as near as I can tell, is not implemented in the ThingSpeak library. The Arduino implementation using the Yun Shield below is simple:
#include "Bridge.h"
#include "HttpClient.h"
/**************************************************************************************************************************/
void checkTalkBack()
/**************************************************************************************************************************/
{
HttpClient client;
char charIn;
String talkBackCommandreply = "";
String talkBackURL = "http://" + thingSpeakAPI + "/talkbacks/" + talkBackID + "/commands/execute?api_key=" + talkBackAPIKey;
// Make a HTTP GET request to the TalkBack API:
client.get(talkBackURL);
// Read the data and build a string
while (client.available()) {
charIn = client.read();
talkBackCommandreply += charIn;
}
}
I have not been able to see how to implement this in Particle. Are there complementary functions for Particle?