Display on LED sign
The sign
The thrift store has a 128x48 red LED display sign.
This describes a general way to obtain and display images on the sign.
Connections
It's driven by a serial port, the cable is plugged into the box on the back of the sign. Currently the other end of the cable is currently located in the server room and is intended to be plugged into ryukin. But any computer with a serial port can drive the display.
Programs
Pauls's ascii2leds
Paul Stoffregen's program (ascii2leds) takes an ascii image and displays on the LED. The ascii image consists of lines of text, 48 lines of 128 characters each. Blanks are black (non-lit LED) and non blank characters cause the associated LED to light.
usage:
ascii2led <file.text> [port]
Kurt's ledpanel
Kurt Krueger's program takes a bitmap image in the PPM format. The PPM image can be generated by many image editing tools, the tool used this discussion is Xv. The bitmap image can't be any taller than the display (48 bits) but can be of any length that's a multiple of 8. Images wider than the display are horizontally scrolled.
usage:
ledpanel <file.ppm> [threshold] [port]
Image preparation
Xv's Grab feature allows one to prepare any image that can displayed on a computer for display on the LED sign. Images that are monochrome work best, but full color images will be converted to a b/w bitmap for display on the LED sign.
The first step is to get the image you want displayed on the computer monitor. This image can come from anywhere. Simple text messages can be created with OpenOffice Word Processor. The image should be about 48 bits high, this means using a font of around 24 points. More complicated images can be created with OpenOffice Presentation or The GIMP.
Note: GIMP can resize and write PPM files directly. The Xv steps can be skipped for GIMP processed images.
Start xv <<<< Need to establish an installed Xv location >>>>>. When the splash screen appears, press the right mouse button. That will bring up the control panel for xv. Press the Grab button. That will bring up a grab panel that explains usage. Press Grab (on grab panel), then use the middle button to drag a rectangular window over the part of the image desired. The area selected will replace the splash screen graphics. Strive for something less than 48 high.
The image needs to be sized to fit the criterion (48 or less high, multiple of 8 wide). Pressing the S key brings up a resizing prompt. Type the new size in the same format as displayed in the prompt box (width x height). Press OK. See below for a list of multiples of 8.
Save the image Save button. Choose format BPM/PGM/PPM (ascii). Any file name will do, .ppm extension not required.
Run ledpanel: <<<<< need installed location for ledpanel >>>>>>
ledpanel <file>
The bitmap should appear on the LED panel.
The two optional parameters for ledpanel are a threshold valued used to convert grey scale images to b/w bitmap. The default is 150 which works for text images and works for color/greyscale images. Valid values are 1 thru 255. The second parameter is the serial port name. Default is /dev/ttyS0.
Some multiples of 8
128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, 320, 328, 336, 344, 352, 360, 368, 376
Program locations
Subject to change
ledpanel and xv are currently located on ryukin under /home/kurtk. There are version built for both Dapper and Feisty.
Xv is a bit persnickity running on a Dapper or Feisty desktop with a wheel mouse. I've had very good behavior on Thinkpad laptops. If one wants to try the code, it would be best when I (Kurt) am around. This is usually Thursdays (AM in build, PM in laptops).
Enhancements, TO DO, etc.
The multistep xv manipulation can be done with X11 programming and would only involve a single step to select the are to be displayed. The size restrictions (including the multiple of 8) can be removed, and vertical scrolling can be implemented.
Future development depends an buy in to this concept. This means someone has to use the Xv method to drive the sign for a while. Then a streamlined program can be written using what's been learned.