Hi all,
I'm using an Arduino Uno with a WiFly shield from Sparkfun (http://www.sparkfun.com/products/9954) to try to post home energy use data to pachube. It works - the first time when I fire it up, but then it does not work on the following loops. Here is the posting code... is there something I need to send at the end to close the link?
I'm using WiFly.h library (WiFly Shield code library alpha 2 release - SparkFun Electronics Forum)
SpiSerial.println("open pachube.com 80");
delay(1000);
SpiSerial.print("POST /api/");
SpiSerial.print(SHARE_FEED_ID);
SpiSerial.print(".csv?_method=put HTTP/1.1\r\nHost: www.pachube.com\r\n");
SpiSerial.print("X-PachubeApiKey: ");
SpiSerial.print(PACHUBE_API_KEY);
SpiSerial.print("\r\nContent-Length: ");
SpiSerial.print(content_length);
SpiSerial.print("\r\nConnection: close\r\n");
SpiSerial.print("\r\n");
SpiSerial.print(pachube_data);
SpiSerial.print("\r\n");
Any ideas?
Cheers,
Brad