I've only made one thing with Arduino in my life: a device that tweets when my dryer is done. I built it based off code provided here: https://makezine.com/projects/make-34/the-dryer-messenger/
It's worked nearly perfectly for the past 5 years but now it has been very unreliable.
Through a 3.5mm input, it monitors the status of the dryer. This still works properly. Once it detects that the dryer is finished, it tries to connect to my wifi to tweet through this library: http://arduino-tweet.appspot.com/
This is where it seems to break. My code thinks that the tweet is properly posted but it doesn't go through. The WiFly device properly connects to the Wifi and tries to send the tweet but it fails.
I can post all of the code if you'd like but it's nearly identical to the code linked to the makezine page.
The important part that isn't working is as follows:
#include <string.h>
#include "TwitterWiFly.h"
#define LIB_DOMAIN "arduino-tweet.appspot.com"
TwitterWiFly::TwitterWiFly(const char *token) : token(token)
{
}
TwitterWiFly::TwitterWiFly(WiFlySerial *_wifly, const char *token) : token(token)
{
wifly = _wifly;
}
bool TwitterWiFly::post(const char *msg)
{
parseStatus = 0;
statusCode = 0;
if(wifly->openConnection(LIB_DOMAIN))
{
wifly->println("POST http://" LIB_DOMAIN "/update HTTP/1.0");
wifly->print("Content-Length: ");
wifly->println(strlen(msg)+strlen(token)+14);
wifly->println();
wifly->print("token=");
wifly->print(token);
wifly->print("&status=");
wifly->println(msg);
}
else
return false;
return true;
}
Does anyone have any tips for troubleshooting this? I assume my code is fine but I don't know what to do if the Twitter Library I'm using is failing to operate.