I had heard about Processing before, however I had not tinkered with it yet. The IDE looks a lot like the Arduino IDE. I am not much of a details guy so I just started searching how to integrate processing with Arduino. SparkFun has a great article on how to use Processing to write to the serial port and use Arduino to read from the serial port.
After some looking around I found this Twitter Client written in processing. Now I just had to put it all together. The getSearchTweets and getTimeline functions in the Twitter client were written to print out data to the console. I tweaked the functions to return strings so I could pass that along to the serial port. Here is my final Twitter Client Processing Script.
I took the SparkFun Arduino code and had to tweak it a bit to read the buffer from the Serail Port and then display the buffer on the LCD. Threw in some delays and had a working LCD twitter display.
Couple issues I noticed. The serial buffer has some weird characters and the word wrapping is a little wonky. I need to figure out how to print the serial buffer without the crazy characters and such. I setup a delay to clear the LCD on arduino. This could be done differently for sure. Right now I grab a tweet every 60 seconds and then display it on the LCD for 20 seconds. This is just test mode stuff and should be a little smarter to see if we have a new tweet, etc.
@thejoestory Weak Sauce
— Bradley Everson (@Evulm0nkey) March 12, 2015
@thejoestory display this tweet on your LCD Yo.
— thejoestory (@thejoestorMarch 12, 2015
Hi I would like use your code but When I execute your program showed me an error
ReplyDeleteHelp a brother out...I at least need the error message
DeleteHi I would like use your code but When I execute your program showed me an error
ReplyDeleteHi! I am trying to incorporate your code to my project but it is giving me an error that says: 'java' does not name a type'. Do you what to do?
ReplyDelete