Go Down

Topic: Twitter library and code example does not work (Read 796 times) previous topic - next topic


I am trying to get Twitter working again. I get an error message
[glow]D:\juha\Arduino\libraries\EthernetDNS\EthernetDNS.cpp:27:42: error: ../Ethernet/utility/types.h: No such file or directory
D:\juha\Arduino\libraries\EthernetDNS\EthernetDNS.cpp:29:40: error: ../Ethernet/utility/spi.h: No such file or directory... and so on and so on[/glow]

I have the twitter library and the ethernet libraries incuded. The code is copied from the skeleton but it does not compile. What is the problem/solution? The code is referring to types and spi files which do not exist.  I have arduino-0019.


* Post a simple message to Twitter  */
#include <SPI.h>
#include <EthernetDNS.h>
#include <Ethernet.h>
#include <Twitter.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 10, 0, 0, 177 };
byte gateway[] = { 10, 0, 0, 1 };
byte subnet[] = { 255, 255, 0, 0 };

Twitter twitter("YOUR-TOKEN");
char msg[] = "Hello, World! I'm Arduino!";

void setup()
 Ethernet.begin(mac, ip, gateway, subnet);


 Serial.println("connecting ...");
 if (twitter.post(msg)) {
   int status = twitter.wait();
   if (status == 200) {
   } else {
     Serial.print("failed : code ");
 } else {
   Serial.println("connection failed.");

void loop()


Hi Juissi,

I have the same issue, and I believe it is down to the new Arduino 19 environment. I wrote my code on Arduino 18, with the help of some of the custom libraries for Twitter and EthernetDNS, and that worked nicely.

Not sure what is causing it though yet, let alone I can fix it. Will let you know if I find anything worth sharing.



:D Your reply was very useful: I rolled back to arduino-0018 and my tweeting aquarium is back online again! Let's hope the issues with 0019 get fixed soon.



same here...
Could not get a new library working(RTClib). Tried a few restarts but no results.
Started V0018 and voila there it was!
Alas it is still not working in 0019 .I think libraries available in 0018
where copied to 0019 during installation but adding new libs is a problem.
I was hoping a rescan/start with 0018 would solve the problem....


Go Up