1 of 1 people found this helpful
I've just tried that one out unmodified - it actually works, but the URL they're using is outdated and no longer returns a tweet in the expected format (only an error). You can try it yourself in your browser, the URL used in the example is:
You can add something like this line:
After these two in the loop() function to see it actually receives the data:
// add incoming byte to end of line: currentLine += inChar;
Hi Alex_T and JEspinoza. Thank you both for your reply.
I did confirm that the URL spits out an error. I learned the hard way that Twitter's new version of their API requires a lot of work with respect to authentication before being able to retrieve tweets. My workaround was to have a php script on a webserver that does all theauthentication and retrieves the tweets I'm interested in. I then use Galileo to access this info via a GET request to said script. Although I did modify the script, it is by no means my own work. I found a video on youtube that pointed me to someone else's work and it worked like a charm. My next step is to grab two tweets and store them in separate strings. Hitting some roadblocks there. Other than that, it's working pretty well.
It would help everyone to help you :-) if you would share more or less exact steps you're trying along with errors you get (in a form of logs, screenshots, screencasts, etc). One could go and find that Twitter.h for sure, then try to do something using it and then maybe the problem you face would exhibit itself (or maybe not) - but it's much easier and relevant (for you) if we immediately see the problem you face.
I think what he is talking about is using the Twitter Library from the Arduino.cc site. You can download it from here:
The examples from that library fail to compile because they make a call to avr\pgmspace.h which only exists for Arduino boards, not for x86. Note: this is a common problem for many of the existing Arduino libraries.
For this library, you can fix the problem by opening up the twitter.h file and commenting out the line:
// #include <avr\pgmspace.h>
The twitter library inlcudes the pgmspace library, but I could not find anyplace where it actually uses the PROGMEM command. More information on the PROGMEM library: Arduino - PROGMEM
I was able to comment out the pgmspace and get the example to compile. I did not get a chance to test it, because I do not currently have an ethernet connection.