/* simpleTweet_00 processing sketch (for use with simpleTweet_00 arduino sketch) by @msg_box june2011
The Arduino is connected to a circuit with a sensor that triggers the code: Serial.write(n); where n = 1 or 2. The Processing sketch listens for that message and then uses the twitter4j library to connect to Twitter via OAuth and post a tweet.
compareMsg() is added in case you want to compare the current and previous tweets to prevent retweets.
This Processing code requires the twitter4j library and your registered app info from dev.twitter.com
This code was made possible and improved upon with help from people across the internet. Thank You. Special shoutouts to the helpful lurkers at twitter4j, arduino, processing, and bloggers everywhere, and to the adafruit & ladydada crowdsource. And above all, to my lovely wife, without whom, none of this would have been possible.