I began looking at the Arduino with Ethernet shield (http://community.thingspeak.com/tutorials/arduino/using-an-arduino-ethernet-shield-to-update-a-thingspeak-channel/) and adapted that to work with the Spark Core. Everything looks to be in order and I connect to the api address but fail to update it each time. Since code pastes seem to look like Poo on this forum I posted my code here:
and the Serial output of the debugging is below, you can see I get a -1 back after sending what I think is a properly formatted update. Any thoughts would be appreciated. Once I get this running I plan to write up a tutorial on this.
=== Starting ===
-Network SSID: redacted
-Local IP: 172.17.2.271
-Link to view streamed data: https://thingspeak.com/channels/14187
.Connected to Spark Cloud
...Attempting to read the DHT22 sensor..Acquired
.DHT22 read successfully
-Temp oF: 71.06
-Data String: field1=71.06&field2=41.60
-Data String Length: 25
...Attempting to update Thingspeak
...Connection succesful, updating datastreams
.Failure from Thingspeak
-Client Read: -1
I sure did, silly copy and paste. Here is the code as it stands.
I'll try changing it to client.println(tsData); and report back later. I have a ton of meetings this morning. :/ thanks for the input though
That may have helped, but what is 100% necessary is to put a slight delay after the client.print statements before you proceed to the client.close. I found a delay of 100 usually works and knocks out the sporadic.
client.print("POST /update HTTP/1.1
Most Users Ever Online: 114
Currently Browsing this Page:
Guest Posters: 1
Administrators: Hans, lee