Pages: [1]   Go Down
Author Topic: Twitter library and code example does not work  (Read 485 times)
0 Members and 1 Guest are viewing this topic.
Helsinki, Finland
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

-juissi

* 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.begin(9600);

  delay(1000);

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

void loop()
{
}
Logged

Netherlands
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Regards,
Arno
Logged

Helsinki, Finland
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

 smiley-grin 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.

-Juissi
Logged

amsterdam
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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....
Logged

Helsinki, Finland
Offline Offline
Newbie
*
Karma: 0
Posts: 16
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Arduino-0020 has the problem, too.
Logged

Pages: [1]   Go Up
Jump to: