How to verify data is received? | Arduino | Forum


Please consider registering


— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
How to verify data is received?
New Member
Forum Posts: 3
sp_UserOfflineSmall Offline
March 2, 2011 - 4:40 pm
sp_Permalink sp_Print


I guess I am the first one to post a question about the use of ThingSpeak with an Arduino. I hope there is someone that has some prior experience, since I am running into a few issues after using the tutorial to modify my existing code.


I have added the code almost exactly as per the tutorial on this website, obviously I modified the data to be sent to ThingSpeak. I also added some Serial.println here and there to see what part of the code is being executed and I get so far that in the Serial monitor of the Arduino IDE (using v0022 on Ubuntu 10.10) I see the message "Connected to ThingSpeak..." which happens at the beginning of the updateThingSpeak(), and I also see "Data sent to ThingSpeak...", which I added at the very last line of updateThingSpeak() in the part where the connection is succesful, otherwise a "Connection failed" would have been shown.


I would expect that means that the arduino sent sensor data to my ThingSpeak channel, but unfortunately, I do not see anything popping up in my web interface when I try to make charts.


This could be:

a) I am doing something wrong (very likely 😉 )

b) the data is indeed received, but not (yet?) available to make charts

c) Arduino does connect, but something is wrong in the communication

I noticed that I never had to fill in my feed id anywhere, but I guess that information is locked in the writeApiKey, right?


Anyone got a clue how to debug this?



Arno Jansen


p.s. the service seems awesome, hope I can get it to work soon!

Natick, MA

Forum Posts: 394
sp_UserOfflineSmall Offline
March 2, 2011 - 6:16 pm
sp_Permalink sp_Print

Thanks for the kind comments. Now, let's hope we can get your Arduino sketch working.


The tutorial was written with Arduino 22 on Windows. Now sure if that makes a difference...


The Channel ID is encoded in the Write API Key, that way a private channel can stay private.


If everything goes to plan the data should be available right away in your feed and charts. Caching only kicks in when you return more than 100 results.


Can you ping the Arduino's IP address? Atleast so we can verify connectivity and cross that off of the list.

New Member
Forum Posts: 3
sp_UserOfflineSmall Offline
March 18, 2011 - 8:02 pm
sp_Permalink sp_Print

Well, what can I say, it works!

See this channel:


But, the data you are seeing there is testdata and does not contain real sensor data yet. Somehow, I can't seem to build a proper string to send to ThingSpeak. I receive the data as comma separated values (i.e. 10.00,666,123,1,0,10). And the comma's should be replaced by "field1=", "&field2=", "&field3=", etc.


I have managed to send this same data to my own webserver and a Pachube feed (, so I have some homework to do...


Any hints appreciated 😉




Natick, MA

Forum Posts: 394
sp_UserOfflineSmall Offline
March 23, 2011 - 12:38 am
sp_Permalink sp_Print sp_EditHistory

If you are going to send sensor data, all you have to do is send the fields in any order using the keys.


10.00,666,123,1,0,10 => field1=10.00&field2=666&field3=123&field4=1&field5=0&field6=10


You can pass the key as an X-header or as a another parameter.


… &key=[write api key]


Make sure content type is:

Content-Type: application/x-www-form-urlencoded


Otherwise, without seeing your code, I am not sure what is breaking down. Can you post some where? I can then get to the bottom of it.

New Member
Forum Posts: 3
sp_UserOfflineSmall Offline
March 23, 2011 - 3:20 pm
sp_Permalink sp_Print



Thanks for the reply. I understand what needs to happen and the code works fine, except my string-manipulation-skills (or lack thereof) have not been able to come up with a solid solution to replace the comma's into "field1=", then "&field2=", etc.


I'd love to share the code, however I am nowhere near the code now, so will have to that some time later...

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
17 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:







Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565


Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee