Twitter Library for Arduino Author: NeoCat
1.0.1 2009-07-11: Fix a bug on multiple posts.
1.0.0 2009-04-12: First release.
1.0.1 2009-07-11: Fix a bug on multiple posts.
Twitter Library is a library for the Arduino to post a message to Twitter via the Arduino Ethernet Shield.
It is convenient to making a bot for Twitter which posts messages automatically from various sensors.
Download here: Attach:Library-Twitter-1.0.1.zip
and put the Twitter directory in "hardware/libraries/" of Arduino IDE.
The library is automatically complied when you launch the Arduino IDE.
You can see an example sketch from "File -> Sketchbook -> Example -> Library-Twitter -> SimplePost".
To create a new sketch, select from the menubar "Sketch->Import Library->Twitter".
Once the library is imported, an '#include <Twitter.h>' line will appear
at the top of your Sketch.
You need also import Ethernet library in the same way.
You need to create an instance of Twitter class like below:
You need also begin Ethernet library.
Begin posting the specified message to Twitter. If connection to twitter.com is established successfully, this function returns true.
If failed to connect Twitter, returns false. (Check Ethernet is correctly configured.)
Posting is not done yet even it returns true. You should call twitter.checkStatus() periodically or twitter.wait().
Check if the posting request is running. Returns true if it's still running.
Returns the HTTP status code in response from Twitter, e.g. 200 - OK.
Only available after posting the message is done and checkStatus() returns false.
Wait until posting the message is done. Return value of this function is HTTP status code in response from Twitter.
Equivalent for code below:
| Last Modified: | July 11, 2009, at 04:07 AM |
| By: | NeoCat |