Alright, so I just bought a WiFi shield from amazon, but it is the same one as from the arduino webstore. I have been trying to get it set up to make tweets with my Uno but it just is not working. I keep on getting "connecting ...failed : code 0". I have checked my wifi via my wifi shield and it connects fine. I have also made sure that my twitter account is confirmed. I really just dont know what to do. I will post my code below with wifi details and twitter token redacted. Any help would be much appreciated.
#include <Ethernet.h>
#include <SPI.h> // needed in Arduino 0019 or later
#include <WiFi.h>
#include <Twitter.h>
char ssid[] = "[wifiName]"; // your network SSID (name)
char pass[] = "[wifiPassword]"; // your network password
// Your Token to Tweet (get it from http://arduino-tweet.appspot.com/)
Twitter twitter("[twitterToken]");
// Message to post
char msg[] = "Automatic tweet!";
void setup()
{
delay(1000);
WiFi.begin(ssid, pass);
// or you can use DHCP for automatic IP address configuration.
// WiFi.begin(mac);
delay(10000);
Serial.begin(9600);
Serial.println("connecting ...");
if (twitter.post(msg)) {
// Specify &Serial to output received response to Serial.
// If no output is required, you can just omit the argument, e.g.
// int status = twitter.wait();
int status = twitter.wait(&Serial);
if (status == 200) {
Serial.println("OK.");
} else {
Serial.print("failed : code ");
Serial.println(status);
}
} else {
Serial.println("connection failed.");
}
}
void loop()
{
}