Instructables
Picture of Arduino LCD Twitter display
a.k.a. the gratuitously complicated bidirectionally communicating Arduino-based scrolling Twitter display and notifier.

----

This project was mainly done as an excuse to learn how to use character LCD displays with my Arduino, and figure out how to make a bidirectional serial protocol.  One major design goal was that the hardware would take user input and communicate back to the PC, not just run as a "dumb" display being driven entirely by the computer.  This allows the Arduino to have a physical scrolling speed control which affects the script running on the PC.

Features:

- 16 x 2 character LCD displaying scrolling tweets from a chosen feed or search term
- Servo-operated flag raises when there are unread tweets (with no Arduino servo twitch!)
- Speed control dial adjusts scroll speed
- It's got Electrolytes
 
Remove these adsRemove these ads by Signing Up

Step 1: System architecture

A rather grandiose title that essentially means "breaking the design into parts", as this is quite a complex thing.

Hardware:

The hardware forms the Arduino's interface with the real world.  The hardware consists of a two-line character LCD for displaying messages, a speed control that lets uers change the scrolling speed while the device is running, and a servo-operated flag that raises when the script detects there are unread tweets.

Firmware:

The sketch running on the Arduino runs a loop doing two main actions.  It sends a "status" request to the script running on the server PC and awaits a response containing the number of tweets in the list, and whether there are any unread.  It then sends a "message" request, gets the text of a tweet, and displays it scrolling across the display.  It reads the potentiometer in real time to get the desired scroll speed, and raises and lowers the flag to notify of new tweets.

Software:

The server software maintains a list of all tweets seen since it started running.  When the script receives a "status" request it replies with the number of tweets it currently has in the list, and whether there are any unread tweets.  When it receives a "message" request the script sends the next tweet in the list, returning to the beginning of the list either when it reaches the end of the list or when it finds new tweets.

The script also has to keep the list of tweets up to date by checking the Twitter API to get the latest messages.  This is also timed to occur at most once every three minutes: when the script receives a "status" request, if more than three minutes have elapsed since the last check, it gets the list of tweets and checks to see whether there are any unread.
JamesJack1 month ago

Hi,

Nice tus, but you can put "on your PC" in the title because i've some step trouble with my Mac OS !

Perl is not easy on Mac OS for a newbies ;-)

PKM (author)  JamesJack1 month ago

Instructions on how to install Perl on Mac OSX are here:

http://learn.perl.org/installing/osx.html

Using it from the command line ought to be pretty much the same deal (though I don't own a Mac so I can't back that up with personal experience).

JamesJack PKM1 month ago
Thank's a lot for your reply ;-)
I'm currently in the final step of the process. I've successfully install Perl and dependencies on my MacBook and it only remains to find how to transform the "Win32::SerialPort" in Mac version!
JamesJack1 month ago

Oh, i forget, and please, i'm a newbies, "what is your transistor value" !!!!?

I want make your tuts please !

PKM (author)  JamesJack1 month ago

That is a very good question which I don't know the answer to. The transistor came in my Arduino experimenter's kit so I'm not sure what the part number is. The servo won't draw much current so the transistor only needs to be capable of switching 5V at about 250mA, so a generic BJT transistor like a 2N2222A would do. The transistor is actually unnecessary, the circuit works just fine without it- it's only there to stop the transistor "twitching" when it's not moving.

PKM (author)  JamesJack1 month ago

That is a very good question which I don't know the answer to. The transistor came in my Arduino experimenter's kit so I'm not sure what the part number is. The servo won't draw much current so the transistor only needs to be capable of switching 5V at about 250mA, so a generic BJT transistor like a 2N2222A would do. The transistor is actually unnecessary, the circuit works just fine without it- it's only there to stop the transistor "twitching" when it's not moving.