hi i`ve been trying to use this library: http://gkaindl.com/software/arduino-ethernet/dhcp/ to read my tweeter feed but i keep receiving a error "the client class has renamed Ethernet Client", im using a srduino duemilanove with atmega328
this is the code im using:
#include <Ethernet.h>
#include <EthernetDHCP.h>
#include <TextFinder.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte server[] = {128,242,240,20}; // Twitter
char tweet[140];
Client client(server, 80);
TextFinder finder( client );
void setup()
{
Serial.begin(9600);
EthernetDHCP.begin(mac);
}
void loop()
{
if (client.connect()) {
client.println("GET http://www.twitter.com/statuses/user_timeline/417539585.rss HTTP/1.0"); // twitter rss
client.println();
}
else {
Serial.println("Connection failed");
}
if (client.connected()) {
// get the last tweet by simply parsing the item and title tags
if((finder.find("<item>")&&(finder.getString("<title>","</title>",tweet,140)!=0)))
{
Serial.println(tweet);
delay(10000);
}
}
}
else
Serial.println("Could not find item field");
}
else {
Serial.println("Disconnected");
}
client.stop();
client.flush();
delay(60000);
}
brunoUC:
hi i`ve been trying to use this library: http://gkaindl.com/software/arduino-ethernet/dhcp/ to read my tweeter feed but i keep receiving a error "the client class has renamed Ethernet Client"
client.println("GET http://www.twitter.com/statuses/user_timeline/417539585.rss HTTP/1.0"); // twitter rss
client.println();
}
else {
Serial.println("Connection failed");
}
if (client.connected()) {
// get the last tweet by simply parsing the item and title tags
if((finder.find("")&&(finder.getString("","",tweet,140)!=0)))
{
Serial.println(tweet);
thank you it worked, but now im getting these messages:
Error Compiling
C:\Users\BrunoT\Desktop\UNDER CONTROL\Arduino\arduino-1.0.1\libraries\EthernetDHCP\EthernetDHCP.cpp:28:23: error: wiring.h: No such file or directory
C:\Users\BrunoT\Desktop\UNDER CONTROL\Arduino\arduino-1.0.1\libraries\EthernetDHCP\EthernetDHCP.cpp: In member function 'int EthernetDHCPClass::begin(uint8_t*, int)':
C:\Users\BrunoT\Desktop\UNDER CONTROL\Arduino\arduino-1.0.1\libraries\EthernetDHCP\EthernetDHCP.cpp:121: error: 'delay' was not declared in this scope
C:\Users\BrunoT\Desktop\UNDER CONTROL\Arduino\arduino-1.0.1\libraries\EthernetDHCP\EthernetDHCP.cpp: In member function 'int EthernetDHCPClass::_startDHCPSession()':
C:\Users\BrunoT\Desktop\UNDER CONTROL\Arduino\arduino-1.0.1\libraries\EthernetDHCP\EthernetDHCP.cpp:159: error: 'millis' was not declared in this scope
C:\Users\BrunoT\Desktop\UNDER CONTROL\Arduino\arduino-1.0.1\libraries\EthernetDHCP\EthernetDHCP.cpp: In member function 'int EthernetDHCPClass::_sendDhcpMessage(DhcpMessageType_t)':
C:\Users\BrunoT\Desktop\UNDER CONTROL\Arduino\arduino-1.0.1\libraries\EthernetDHCP\EthernetDHCP.cpp:193: error: 'millis' was not declared in this scope
C:\Users\BrunoT\Desktop\UNDER CONTROL\Arduino\arduino-1.0.1\libraries\EthernetDHCP\EthernetDHCP.cpp: In member function 'DhcpState_t EthernetDHCPClass::poll()':
C:\Users\BrunoT\Desktop\UNDER CONTROL\Arduino\arduino-1.0.1\libraries\EthernetDHCP\EthernetDHCP.cpp:488: error: 'millis' was not declared in this scope