What code? What "doesn't work"? You know that "doesn't work" is pretty lame, right? There is absolutely nothing to go on. The only thing we know is that, by your definition of work, whatever that is, the code failed to live up to your expectations, whatever they were.
Filippos:
However, I cannot get it to work with Cosm. Has anyone made any progress on that? Any other code I found just does not work.
The reason why the sketch won't work with cosm is that it was never intended to work with cosm. There is plenty of code around that does work. The most likely place to find it is in the "It Works!" section of the cosm forum. You will even find one of mine you can use or adapt.
I suspect you don't know what cosm is about. It is an internet data service that you feed to, but that data can be made available to the public. The vital thing is that it uses two keys - a feed id that the public can use, and yourself, and an API key that is exclusive to you, covers all your feeds, and is used for maintenance etc. Any cosm sketch will contain both these keys.
The first thing you need to do is register with cosm and thereby obtain the keys.
Note that a "feed" may include several sensors. It is not necessary to include date and time in a feed.
Note also that there a couple of new libraries, cosm and httpClient, that make life a lot easier.
Hello,
Thanks for your replies. Let me be more specific in this post, I only meant to give a general idea of the issue in order to see of I was overlooking something apparent to more experienced users. I am just starting to work with the Arduino and my errors could be elementary...
I can use the arduino as a server and i.e. set up a webpage that refreshes and contains the temperature I read from a sensor
I tried several sketches, like the ones for twitter, cosm, Thingspeak, but I could not get it to upload data. Even the simple http example from arduino didn't work. I could ping to the IP address, and I got messages with codes that I could not find what they meant (i.e. cosmclient.get returned -3). I tried the wiki on http error codes but there were no such numbers.
My connection is with static IP, so I give all the relevant info for the Ethernet. The fact that I can ping to it and it replies, means that this part has been properly set up right?
About cosm, I have set up a new account and feed, and have always included the keys in it.
OK. Now assuming you have some code for using cosm, and assuming a clear understanding that there is no connection between the code you posted and that required for cosm, try uploading the cosm code. Use the # button and paste it between them. Truncate the API key.