Hey JO3RI,
Thanks for all your help! i've got the program running on the 1.0 IDE. However nothing shows up on my screen on the board. Suspect its either the connection setup that's incorrect, IP/gateway/dns that's wrong, or the fact that my account is set to private that is the problem.
Just to check, my board is connected via USB to the computer, i've got an adapter connected to the power and my Ethernet cable connects it straight from the wall socket. How do you check for the IP/gateway/dns info then? i'm running a mac here. what will happen if you enter a wrong value for the above info? will anything show up on the LCD? right now it's just black pixels on the screen.
i'll try setting my account to public and trying once again.
this is the code i used. edited from yours.
//--------------------------------//
#include <LiquidCrystal.h>
//initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
#include <SPI.h>
#include <Ethernet.h>
#include <TextFinder.h>
// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = { 0x00, 0x00, 0x90, 0xA0, 0xB0, 0xC0 };
byte ip[] = { 192,168,1,20}; //change this
byte subnet[] = {255,255,255,0}; //change this
byte gateway[] = {192,168,0,1}; //change this
byte dns[] = {192,168,0,1}; //change this
EthernetClient client;
String TwitterName ="kennethbeatle"; //change this to your own twittername, or follow me
char tweet[140];
String SearchString ="";
byte charsize;
char serverName[] = "api.twitter.com"; // twitter URL
void setup() {
// initialize serial:
Serial.begin(9600);
// attempt a DHCP connection:
Ethernet.begin(mac, ip, dns, gateway, subnet);
// connect to Twitter:
delay(3000);
}
void loop(){
Serial.println("connecting to server...");
if (client.connect(serverName, 80)) {
TextFinder finder( client,2 );
Serial.println("making HTTP request...");
// make HTTP GET request to twitter:
client.print("GET /1/statuses/user_timeline.rss?screen_name=");
client.print(TwitterName);
client.println("&count=1 HTTP/1.1");
client.println("HOST: api.twitter.com");
client.println();
Serial.println("sended HTTP request...");
while (client.connected()) {
if (client.available()) {
Serial.println("looking for tweet...");
SearchString = SearchString + TwitterName + ": ";
charsize = SearchString.length() + 1;
char StartHere[charsize];
char EndHere[] = "";
SearchString.toCharArray(StartHere,charsize);
if((finder.find("")&&(finder.getString(StartHere,EndHere,tweet,140)!=0)))
Serial.println(tweet);
break;
}
}
delay(1);
client.stop();
}
Serial.println("delay...");
delay (60000);
// don't make this less than 30000 (30 secs), because you can't connect to the twitter servers faster (you'll be banned)
// off course it would be better to use the "Blink without delay", but I leave that to you.
}