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.
For information on Paul Stoffregen's ressurection of the sign, see http://llama.freegeek.org/~pjs/ledsign.html
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 Free Geek's internal application server. 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 tools used this discussion are Xv and The Gimp. The bitmap image can't be any taller than the display (48 bits) but can be of any length. Images wider than the display are horizontally scrolled.
usage:
ledpanel <file.ppm> [threshold] [port]
Image preparation with Xv
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 may need to be sized to fit the criterion of 48 or less high. 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.
Save the image Save button. Choose format BPM/PGM/PPM (ascii). Any file name will do, .ppm extension not required.
Image preparation with The Gimp
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
Start Gimp: Applications->Graphics->GIMP image Editor
Within Gimp, acquire the window with the Image: File->Acquire->ScreenShot...
Press the Grab button on the dialog that appears, and then click in the window that has the image. At this point, a GIMP editing window will appear.
Select Tools->Selection Tools->Rect Select Use the mouse to drag a rectangle over the area you want to display on the sign. The area and size being selected will be displayed on the bottom of the window. Make sure the height does not exceed 48. If you make a mistake, ^Z will undo the selection and you can drag another rectangle.
Select Image->Crop Selection Only what was selected will remain.
Select File->Save as... In the file name, type whatever name is desired, with (important) a .ppm extension. A dialog will appear, select "Ascii" and "OK".
Displaying an image file
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.
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.
The Gimp is part of the standard Ubuntu installation.
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/Gimp manipulation can be done with X11 programming and would only involve a single step to select the are to be displayed. The size restrictions can be removed, and vertical scrolling can be implemented.
Future development depends on buy in to this concept. This means someone has to use the Xv/Gimp method to drive the sign for a while. Then a streamlined program can be written using what's been learned.
Fancy stuff
There is no timeout in ledpanel. If the image is wider than the display, it will scroll until stopped with a ^C.
Multiple images can be displayed in sequence using a script. An example follows, including killing a scrolling display so the next image can be displayed.
#!/bin/bash ledpanel foo.ppm & sleep 5 # wait 5 seconds, then kill %1 # kill the running ledpanel program. ledpanel jack # this will run until killed