tuitwall is a project that will allow you to show tweets in a led matrix. It has a web interface build with PHP that allows people to log in with their twitter account to display their tweets.
- HTTP Server (e.g. Apache)
- PHP 5 (will probably work with v4 too)
- Arduino board
- Arduino Ethernet Shield
- Ethernet cable
- Sure Electronic's 32x08 Red Led 5mm Dot Matrix
- HT1632-for-Arduino library
- Arduino IDE v1.0 or newer
Note: this has been tested only with one led matrix, but it can be extended up to 4 boards (and further) with proper code.
- SERVER: root direction of the web interface (excluding
- CONSUMER_KEY & CONSUMER_SECRET: consumer application keys, get them from https://dev.twitter.com/apps
- ANYWHERE_CONSUMER_KEY: key to make @Anywhere available at the page to auto-linkify @users, #hastags and http://links
- OAUTH_CALLBACK: location of the PHP script that will receive the OAuth Callback. It should point to
- API_KEY: only devices with the same
API_KEYwill be able to get tweets through fetch.php. Leave empty (
"") to disable the check
- SHOW_TWEET: show current tweet at main page?
- SHOW_USER: include tweet owner when giving a tweet to a device through
- STREAM: show a stream from UStream at the main page? Useful when doing a demo of the project
- USTREAM_ID: ID of the stream from UStream you want to show
- DISALLOW_LOGOUT: disallow logging out to keep tweets of a specific user being shown. To log out you have to delete
auth.txtfrom the web server
- API_KEY: same as
- SERVER: same as
- GET_REQUEST: shouldn't be modified
- INTERVAL: milliseconds to wait at least between tweet requests
- VEC_LENGTH: length of the array where the tweet will be stored
- SPEED: milliseconds to wait at least between led matrix refreshes
The reason there are so many options to limit access to tweets is because Twitter only allows clients to make a limited number of requests in a given hour.
- Upload the contents of the
webfolder to a web server
- Adapt the configuration to your needs
- Change the
SERVERconstant (both in the Arduino sketch and
config.php) to the appropiate one
- Change the
API_KEYto a different one. Remember to use the same in the Arduino sketch and
- Create a Twitter application and point the Callback URL to the location of
- Copy the Consumer key and Consumer secret keys to
- If you want the @Anywhere auto-linkify functions create another application in Twitter and copy the Consumer key. Callback URL just has to match up to the subdomain.
- Change the
- Mount the Arduino and Ethernet Shield and connect to the PC
tuitwall.inoto the Arduino
- Connect the led matrix board to the Arduino (continue reading for schematic)
- Check that the led matrix board has its direction set to 1 (switches at the back)
- Connect the Ethernet Shield to a router through an ethernet cable
- Reset the board
Remember that the sketch outputs debug messages to the serial port (at 115200bps), so you can follow the initialization and execution of the sketch. The Ethernet Shield relies on a DHCP enabled network, if this is not the case, please modify the code as required to give an appropiate static IP.