Alpha 220 LED Sign
From NAS-Central Buffalo - The Linkstation Wiki
m |
m (→Install a Serial Port Interface) |
||
| Line 13: | Line 13: | ||
| - | I used a board from futurelec, they are dirt cheap, but take forever to get to you | + | {| |
| + | |- | ||
| + | ||I used a board from futurelec, they are dirt cheap, but take forever to get to you | ||
http://www.futurlec.com/Mini_RS232_TTL_3V.shtml | http://www.futurlec.com/Mini_RS232_TTL_3V.shtml | ||
| Line 19: | Line 21: | ||
[[Image:ET-MINI_RS232_3V.jpg|200px]] | [[Image:ET-MINI_RS232_3V.jpg|200px]] | ||
| - | I used a Quick port RJ-12 jack to interface the sign to the serial port converter | + | ||I used a Quick port RJ-12 jack to interface the sign to the serial port converter |
[[Image:RJ12jack.jpg]] | [[Image:RJ12jack.jpg]] | ||
| - | Then I shoved the whole thing in a 2 port Quick port surface mount housing | + | ||Then I shoved the whole thing in a 2 port Quick port surface mount housing |
[[Image:2PSM.jpg]] | [[Image:2PSM.jpg]] | ||
| + | |} | ||
==Interface Sign to Serial Port Interface== | ==Interface Sign to Serial Port Interface== | ||
Revision as of 22:32, 9 August 2007
| I am using my Kuro Pro to drive an Alpha 215/220 LED Display I happened to have one of these signs lying around. |
| 220 Full Matrix, (Case 37.7" x 3.8" x 2.9 ") Tricolor[1] |
Contents |
Install a Serial Port Interface
First you are going to have to install a serial port interface. I ended up installing mine to the serial port on the bottom, but the serial port on the front is easier and the same.
| I used a board from futurelec, they are dirt cheap, but take forever to get to you | I used a Quick port RJ-12 jack to interface the sign to the serial port converter | Then I shoved the whole thing in a 2 port Quick port surface mount housing |
Interface Sign to Serial Port Interface
I used a standard 6 wire telephone cable meant for a two line phone (a 4 wire one will not work) Plug one end into the sign. And one end into the Quick port RJ-12 Jack Wire the jack into the serial port board as such[2]
- Pin 4 of the RJ12 to RS-232 RX.
- Pin 3 of the RJ12 to RS-232 TX
- Pin 6 of the RJ12 to RS-232 GND
Setup the serial port
You will have to adjust the serial port settings. I use a script to do this. My information came from a FAQ on using the Alpha sign with Linux[3].
setledsign
# /usr/local/bin/setledsign #!/bin/sh rm /dev/alpha ln -s /dev/ttyS0 /dev/alpha chmod a+rw /dev/alpha stty 9600 -opost -ocrnl -onlcr cs7 parenb -parodd < /dev/alpha
Wake up the sign and display something on it
I use a script that I stole from the above site.
alphamon.pl
# alphamon.pl # #!/usr/bin/perl # # Script will display the contents of /tmp/textfile to the ALPHA 220C LED # Display # # Usage # # alphamon.pl [MODE TAG] [COLORTAG] # Get the attention of the sign print "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; # Tell the sign to print the message $message = `cat /tmp/textfile` ; print "\001" . "Z" . "00" . "\002" . "AA" . "\x1B" . " $ARGV[0]" . "\x1C" . "$ARGV[1]" . $message . "\004";
Alpha Sign Syntax
"\001" . "Z" . "00" . "\002" . "AA" . "\x1B" . "t". "\x1C" . "1". Hello World . "\004"
| Value | Meaning | Code Type |
| \001 | SOH | Start of Header |
| Z | Direct at all Signs | Type Code |
| “00” | All Signs Should Listen | Sign Address |
| \002 | Start of Text Character | Start Type |
| A | Text File | Write File Type |
| A | A | File Label |
| \x1B | ESC | Start of Mode Field |
| t | compressed text | MODE TAG (see below) |
| \x1C | color control code | Control Code |
| 1 | red | COLORTAG (see below) |
| Text | Hello World | Text Message |
| \004 | EOT | End of Transmission |
MODE TAG and COLORTAG
The key parts of this are the MODE TAG and COLORTAG, there is full documentation available for this[4] but here are the pertinant parts.
|
|
Stock Ticker
I do use the sign for a number of other purposes, to display RSS feeds and weather forecasts. But the most complicated script is to display a live stock ticker that gets it's data from yahoo. It then colors the prices green if they are positive/up and red if they are negative/down for the day.
First you should install perl and make
apt-get install perl make
Then install the quote package [5]
wget http://www.circlemud.org/pub/jelson/quote/quote-0.05.tar.gz tar -xvzf quote-0.05.tar.gz cd quote-0.05 ./configure ./make ./make install
you may as well install curl and lynx so that you can use them to get content from the web later
apt-get install curl lynx
Lastly here is a shell script to display the ticker
leddisplay
# /usr/local/bin/leddisplay
#!/bin/sh
# Stock ticker symbols
#
PTE=/usr/local/bin
stocks=" ^DJI ^IXIC ^GSPC "
quote $stocks | cut -d"(" -f1 |sed 's/^/\x1C9 \x7F \x1C3 /' | sed '/ -/s/:/\x1C1/g' | sed '/ +/s/:/\x1C2/g' > /tmp/textfile
$PTE/alphamon.pl t A > /dev/alpha



