Programming the Betabrite one line LED sign




  • Why write this page?
  • What is the BetaBrite LED sign?
  • Sign Specs.
  • BetaBrite Overview
  • Cable Construction
  • Basic Protocol Overview
  • How it Works
  • Setting Memory
  • Setting the Run Sequence
  • Perl Scripts



  • Why write this Page?

    I've always wanted an LED sign for years. Searching around the net I found Walt's LED Sign Page. I orignally was looking at the Pro-Lite sign and emailed Walt asking a few questions. He told me about the protocol for the BetaBrite being released. My focus changed to the BetaBrite and any available information on it.

    I purchased the sign and built the cable with the info on Walt's site. I've added my version of building the cable to this site with part numbers and pictures of the easily obtainable parts to make it as easy as possible.

    This is definately a cool geek toy. With a little knowledge of Perl, or your choice of programming/scripting languages you can do some cool things with this. Computer related possibilities include displaying system information, headlines off the Internet, reports from system monitoring and many other things. If you can write some simple code, you can program this sign.

    I code in Perl and use Linux as my Operating System. This really opens up what you can do with the sign scripting wise. Any examples on this site will be in Perl and is written from a viewpoint that your using Linux as your OS. Any changes to make it run on a non-Linux platforms are up to you.

    The following is to get somebody that is interested in programming with the ALPHA protocol up to speed quickly and stuff that I have learned about the sign.

    This page isn't fancy..I coded it in VI






    What is the BetaBrite LED sign

    The BetaBrite sign is an Electronic Color Message Display using the ALPHA protocol by Adaptive Micro Systems, Inc.

    AMS recently released the Alpha Sign Communications Protocol. This allows some of us hacker types to write custom apps for the sign. The BetaBrite is not the only sign to use the ALPHA protocol, but it's the cheapest. Any of the stuff you learn can be applied to the other models.

    The BetaBrite one-line sign has several models:

  • Model 1036, introduced in 1998
  • Model 1026
  • Model 1040
  • There is also a Series 200 Alpha LED Sign - model 215C. I was confused about what the difference was when I first got my BetaBrite sign. A quick look and you think they are one and the same. That's not correct.

    Frank from Pacesetter Signs answered my questions about the models that I asked when I first purchased my sign. This is an edited version from the BetaBrite Forum on www.ams-i.com

    ---------------------
    >Sign info:
    
    >EZ95
    >8K RAM
    
    >Rom version:
    >(c)AMS 1040-4402d
    >1997 BETA EZ95
    
    >Kinda old. Is this the model before the 215c? 
    >Some of the differences seem to be the that it doesn't have the second jack on
     the sign (not really needed I don't think) or the 215c rom.
    
    The 1040 version of the Beta-Brite is model 2 of 3, but that's still pretty much
    the same protocol. The newest version (has a black alum. enclosure vs dark grey 
    plastic) has a few added features but no real biggie.
    
    >Is this the model before the 215c?
    
    "They are totally different signs. The Beta-Brite/BETAbrite line is separate from
    the Alpha line. The Alpha 215C is the Beta-Brite's "big brother" in that it had 
    RS485 and RS232 inputs, RS485 bridged output, real-time clock (rolls over 
    automatically at midnight), addressability, 90 pixel width vs 80, and the internal 
    counters."
    ----------------------
    
    Same protocol but different signs




    LED sign Specs.

    Features:

  • 8 true colors and 3 rainbow effects
  • Stores & displays up to 75 messages
  • Create your own graphics & logos
  • 6 Character fonts
  • Wireless remote control
  • Easy 3-step message entry
  • Real-time clock
  • Easy networking
  • One year USA factory warranty

    Model(Indoor)215C
    RatingStandard
    MatrixFull
    Character Height2 inch
    Characters Displayed27 in condensed rotate mode
    Serial InterfaceRS232
    Pitch0.3"
    Max. Viewing Distance 100'/30m
    Case MaterialAluminum (older sign are plastic)_
    Display Dimensions27" x 2.1" x 4.5" ( 73.4 x 5.3 x 11.4 cm )
    Case Size 28.9 x 4.5 x 2.1
    Weight7 lbs (3kg)
    LED ColorTri-color
    No. Messages stored and displayed 81
    Operating Temp.0-50 C
    Compatable InterfacesAlpha / SmartAlec
    Display Config AvailDiscrete/ Ethernet
    Max. Charaters / Height15 /2.1"




    BetaBrite Overview


    Colors - 8

    Red - Green - Dim Red - Dim Green - Amber - Brown - Orange - Yellow

    Operating Modes - 26

  • Automode
  • Rotate
  • Hold
  • Flash
  • Roll (6 Directions)
  • Wipe (6 Directions)
  • Scroll
  • Compressed Rotate

  • CALL DOT
  • SPECIAL
  • Some of SPECIAL text displaying modes are:

  • TWINKLE
  • SPARKLE
  • SNOW
  • INTERLOCK
  • SWITCH
  • SLIDE
  • SPRAY
  • STARBURST
  • SPECIAL graphics are:

  • WELCOME - The word 'Welcome' is written in script across the sign.
  • THANK_YOU - The words 'Thank You' are written in script across the sign.
  • SLOT_MACHINE - Slot machine symbols appear randomly across the sign.
  • NO SMOKING - A cigarette image appears, extinguished, then no smoking symbol.
  • NO DUI - A car runs into a cocktail glass the text "Please don t drink and drive".
  • RUNNING ANIMAL - An animal runs across the sign.
  • FIREWORKS - Fireworks explode randomly across the sign.
  • TURBO CAR - A car drives across the sign.
  • CHERRY BOMB - A bomb fuse burns down followed by an explosion.
  • It's also capable of displaying the Day, Time and the date in several different formats.

    Fonts

    There are 6 fonts available in the protocol. 3 of these work on the BetaBrite, but there is also a "Wide" mode that doubles the number to the specified 6


  • Font 1 - Five High Standard

  • [ Font 1 example]

  • Font 2 - Seven High Standard

  • [ Font 2 example ]

  • Font 3 - Seven High Fancy

  • [ Font 3 example ]

    The other fonts listed in the protocol appear as listed
  • Ten High Standard
  • - Displays as 7 High Standard on the BetaBrite
  • Full Height Fancy
  • - Displays as 7 High Fancy on the BetaBrite
  • Full Height Standard
  • - Displays as 7 High Standard on the BetaBrite

    Yes..the sign has 6 fonts. There are "Wide" and "Double Wide" modes ( which seem to be the same thing on the BetaBrite). More about this later.




    Cable Construction

    Walt has info about making the cable. I originally went by the info on Walts site for building the cable. To make things a little easier I have the parts I used and where to get them. Like Walt, I also have pictures of the items properly connected.

    Here are the parts I used. Here are the part #'s and the links. Radio Shack seems to change there site every 4ms..so if they don't work you'll have to search.

  • Radio Shack - 6 wire cable - 279-422


  • Radio Shack Online - DB9F-RJ12 Adpater - 95-287

  • The connector - Wires snapped in place - back view - 1
    Cable Picture 1

    The connector - Wires snapped in place - back view - 2
    Checking the cable plugged into DB-9 cable (extension)
    Cable Picture 2

    Here's a small test script just to see if you can talk to the sign once your cable is constructed. It loads a message into the first TEXT file on the sign and displays it. This is programming the sign in it's simplest form. Oh..and you must have Perl installed :)


    #!/usr/bin/perl
    
    print "\0\0\0\0\0\001" . "Z" . "00" . "\002" . "AA" . "\x1B" . " b" . "Test Message" . "\004";
    

    Now save it as 'test-sign.pl' and execute it redirecting output to the serial port ( COM 2 in this example) that the sign is connected to:
    	test-sign.pl > /dev/ttyS1

    You should see the message appear on the sign.
    Now that looks like some cryptic stuff. It becomes easier once all the protocol items are loaded into variables. That script programs the default text file A with the message and displays it. More one text files later. Also this is as easy as it gets. Once you go past playing with the default text file, it gets a little crazy.






    Basic Overview of protocol

    The BetaBrite is one of Adaptive Micro Systems ALPHA display signs. This means it is programmed using the EZ KEY II / EZ95 protocol. Below are sections from the protocol manual and a description of each to get you up to speed. Some of the things mentioned in this section will be covered later on.

    Items in white and quoted are from the AMS
    protocol pdf:

    This is a freely available document. Where I have quoted from it I give the section numbers. Since the documnt is freely available I'm guessing there's nothing wrong with doing so.

    The first thing to understand is how to go about programming the sign. There are TEXT files ( your messages ), DOT FILE PICTURES (custom graphics) and STRINGS.

    Programming the sign consists of the following steps in this order

  • Set MEMORY SETTINGS for all TEXT, DOT and STRING files
  • Set TEXT, DOT and STRING files
  • Set RUN SEQUENCE of LABELS
  • But in order to SET MEMORY you need to know the sizes of your TEXT, DOT and STRING files!

    I'll go over what each thing is.

    "The Alpha line of products supports several types of files and a number of special functions which are used for specific applications"

    TEXT files ( Section 3.0 )
    "The ASCII message data and display mode information, along with various other control codes, are stored in TEXT files. DOTS PICTURE files and STRING files may be inserted into a TEXT file."

    "As well as containing the actual message, calls to other types of files may be inserted into TEXT files. For example, if you wish to include a DOTS PICTURE as part of a TEXT file, you may simply include a call to a DOTS PICTURE file in the proper location in your TEXT file."

    How to look at it - your messages are the TEXT files. Consider each TEXT file a line of text or a "page" which can be longer than the width of the display. To better understand this, you set the TEXT files and then create a RUN SEQUENCE of which TEXT files you want displayed and their order. So in short a TEXT file can be several screens of text, but all of the message that is programmed under that TEXT LABEL is called when it is added to the RUN SEQUENCE.

    On initial power-up, the signs memory is configured with one TEXT file (File Label = A ).
    If multiple TEXT files are required you must set the memory for them(more on LABELS and SET MEM later)


    DOTS PICTURE files ( Section 3.0 )
    "DOTS PICTURE files contain data patterns that correspond to a display picture. These patterns can be used to create virtually any logo pattern on the display of the message center. These DOTS PICTURE files are accessed via TEXT files. DOTS PICTURE files have a maximum size of 31 x 255 pixels."

    How to look at it - The DOT PICTURE file is nothing more than a map of the LEDs to light and the color to light them as. You have to get the graphics in the proper format and program them into the sign under a DOT LABEL. Once this is done you can CALL them into your TEXT file.

    Here's an yellow arrow pointing right.
    The following string would be part of the frame sent to the sign.

    00000080000\r00000088000\r08888888800\r08888888880\r08888888800\r00000088000\r00000080000\r
    
    Here it is formatted so you can see it. 0=off, 8=yellow
    00000080000\r
    00000088000\r
    08888888800\r
    08888888880\r
    08888888800\r
    00000088000\r
    00000080000\r
    
    Each character represents a color

    off 0 or 30H red 1 or 31H green 2 or 32H amber 3 or 33H dim red 4 or 34H dim green 5 or 35H brown 6 or 36H orange 7 or 37H yellow 8 or 38H

    Notes: To correctly program a DOT FILE you must also calculate the DOT MEMORY SIZE.(more later) The first two bytes = # pixel rows and the last two bytes = the # of pixel columns in the picture.

    For drawing purposes the BetaBrite display is a 7 x 80 matrix.


    STRING files ( Section 3.0 )
    "The STRING files are used to store ASCII characters only. STRING files are used in applications where a string of frequently changing data must be transmitted to, and displayed by, the message center. Applications include the storage of a number which changes often, such as a temperature, a quantity, or a timer."

    I haven't experimented with the STRING files but the description seems pretty basic. This seems to be a file you can set up in memory and then write changes to. You can then insert these STRING files into your TEXT file. Sounds like to calling DOT files but instead of inserting a graphic, your inserting a STRING file..kinda like printing a variable.

    I'll add more on this when I work with them :)


    LABELS format ( Section 4.1 )
    "A File Label is a single ASCII character. Messages are stored in or retrieved from the memory file that is defined by this label in the Memory Configuration. File Labels can be anywhere in the range 20H through 7EH inclusive. The only special case occurs when File Label 0 (30H) is used for a Priority TEXT file (see Priority TEXT files on page 14) which is pre-configured as a set portion of memory outside of the Memory Pool."

    From the protocol doc ( section 4.1.1 - Valid Label Formats )
    20H - sp  30H -  0  40H -  @  50H -  P  60H -  `  70H -  p  
    21H -  !  31H -  1  41H -  A  51H -  Q  61H -  a  71H -  q  
    22H -  "  32H -  2  42H -  B  52H -  R  62H -  b  72H -  r  
    23H -  #  33H -  3  43H -  C  53H -  S  63H -  c  73H -  s  
    24H -  $  34H -  4  44H -  D  54H -  T  64H -  d  74H -  t  
    25H -  %  35H -  5  45H -  E  55H -  U  65H -  e  75H -  u  
    26H -  &  36H -  6  46H -  F  56H -  V  66H -  f  76H -  v  
    27H -  `  37H -  7  47H -  G  57H -  W  67H -  g  77H -  w  
    28H -  (  38H -  8  48H -  H  58H -  X  68H -  h  78H -  x  
    29H -  )  39H -  9  49H -  I  59H -  Y  69H -  I  79H -  y  
    2AH -  *  3AH -  :  4AH -  J  5AH -  Z  6AH -  j  7AH -  z  
    2BH -  +  3BH -  ;  4BH -  K  5BH -  [  6BH -  k  7BH -  {  
    2CH -  ,  3CH -  <  4CH -  L  5CH -  \  6CH -  l  7CH -  |  
    2DH -  -  3DH -  =  4DH -  M  5DH -  ]  6DH -  m  7DH -  }  
    2EH -  .  3EH -  >  4EH -  N  5EH -    6EH -  n  7EH - 1/2 sp 
    2FH -  /  3FH -  ?  4FH -  O  5FH -  _  6FH -  o  7FH - reserved
    
    20H through 7EH - excluding Priority TEXT file 30H ( zero ).

    Ok, a majority of these are extended characters. If we stick to human readable and easy programable labels, we have around 61 out of the 95 ( 95 in the protocol, but the BetaBrite box says 75 messages). I'm saying this because from my viewpoint and method of programming, I'm using characters and not hex values. I'd really hate to see some of these parsed from a text file in Perl.Besides, I type and read in english, not hex :)




    How it works

    We've reviewed, quickly, the major aspects of how the sign is programmed. The terms atleast.

    Here we'll set up some variables to make life a lot easier and then I'll use a "WRITE TEXT FILE" frame as an example of how to program the sign.
    Here is description of the transmission frame and some code from my Protocol script for example purposes.

    Note: I'll hightlight sections of the frame in color, to break it apart, and also have the text that explains it in the same color:

    The 'Standard Transmission Frame' is:
    [ NULs ][ SOH ][ Type Code ][ Sign Address ][ STX ] [ Command Code ][ Data Field ] [ EOT ]

    We'll set some variables and build some other useful ones.
    Every message frame you send to the sign must start with the items listed below.

    $NUL            = "\0\0\0\0\0\0";       # NUL - Sending 6 nulls for wake up sign and set baud neg.
    $SOH            = "\x01";               # SOH - Start of header
    $TYPE           = "Z";         		# Type Code - Z = All signs. See Protocol doc for more info
    $SIGN_ADDR      = "00";      		# Sign Address - 00 = broadcast, 01 = sign address 1, etc
    $STX            = "\x02";               # STX - Start of Text character
    
    # These are other useful variables
    $ETX            = "\x03"; 		# End of TeXt
    $ESC            = "\x1b"; 		# Escape character
    $EOT            = "\004"; 		# End of transmission
    
    # We group some of the variables above to make life easy.
    # This leaves us 2 type of init strings we can add to the front of our frame.
    $INIT="$NUL$SOH$TYPE$SIGN_ADDR$STX";		# Most used.
    $INIT_NOSTX="$NUL$SOH$TYPE$SIGN_ADDR";		# Used for nested messages.
    
    

    Note:
    Sign Type - Since I have just one sign I set it to 'all signs'.
    Sign Address - Each sign as a user settable address.

    If your not familiar with it, the '\x' means the value following is a HEX value.

    If you look at the $INIT varaible you'll see I've grouped several varaibles together to make one.
    We now have $INIT and $EOT which will be the start and end of every frame we send to the sign. Now each frame becomes easier to construct.

    We now have a more compact string for the beginning of the frame and it's now:
    $INIT[ Command Code ][ Data Field ]$EOT


    Command Code - Data Field sections.

    $INIT[ Command Code ][ Data Field ]$EOT

    Here is just one example of the [command code][data field] part of the frame. For every different 'command code' in the beginning of the field, the other ones after it change. Walking through the frame we'll treat this example as if it was a 'WRITE TEXT' frame.

    The [ Command Code ][ Data Field ] can be broken down into the following parts for a WRITE TEXT frame

    [COMMAND CODE][FILE LABEL] <esc> [Display Position][Mode Code] Speical Specifier [ASCII MESSAGE]

  • Command Code

  • One ASCII character that tells the sign what we want to do.
    $WRITE		="A"; # Write TEXT file
    $READ		="B"; # Read TEXT file *
    $WRITE_SPEC	="E"; # Write SPECIAL FUNCTION file
    $READ_SPEC	="F"; # Read SPECIAL FUNCTION file *
    $WRITE_STRING	="G"; # Write STRING file *
    $READ_STRING	="H"; # Read STRING file *
    $WRITE_DOT	="I"; # Write DOT file
    $READ_DOT	="J"; # Read DOT file *
    

    * Note: I haven't tried any of the READ files stuff or the STRING stuff yet

  • File Label

  • One ascii character that indicates the LABEL being accessed (page)
    $LABEL = "A"; #File A

    0 (zero) is special and means "Priority Text"

  • esc character - starts the Mode Field
  • <ESC> (1BH) always starts the Mode Field. I'll send this with the next part in our WRITE TEXT example.

  • Display Position - single ascii character that defines the line postion

  • On one line signs, the Display Position is irrelevant, but still must be included so just send a blank or \x20

    Middle line = " " or \x20
    Top Line = \x22
    Bottom Line = \x26
    Fill - all = \x30

    Note = \x20 seems to be best on the Betabrite sign.

    # I create DPOS ... notice the -esc- to start the Mode Field:
    $DPOS="\x1b\x20"; # Set for BetaBrite one line sign

  • Mode Code - Single ASCII character that represents a mode for displaying the ASCII message.
    Examples:
    Here are 3 of the many modes.Examples:
    $ROTATE ="\x61"; # Message travels right to left.
    $HOLD ="\x62"; # Message remains stationary.
    $FLASH ="\x63"; # Message remains stationary and flashes.

    Above you see Special Specifier..that only if your using a SPECIAL MODE or SPECIAL GRAPHIC.

  • ASCII Message - The actual text to be displayed on the sign.
    $message="Hello World!"


    Bringing it all together.

    If we were just programming the default TEXT FILE "A" like above, we don't need to SET MEMORY for the TEXT FILE or send a RUN SEQUENCE. In order to set anything more than the default TEXT FILE A you will need to do so.
    Our example here is good for only the TEXT FILE label "A".

    Now that we have our variables set we can send a frame to the sign.
    We end up with: (if BETABRITE is a filehandle >>/dev/ttyS1 )
    print BETABRITE "$INIT" . "$WRITE" . "A" . "$DPOS" . "$HOLD" . "$message" . "$EOT";

    Now that we have everything set, changing to different type of frame is easy. The $INIT and $EOT will always be sent.


    Setting Memory

    Once you go beyond programming the default TEXT file ( Label "A" ), anything else you want to do (FILE, DOT or STRINGS) requires the setting of memory for the file. This means the TEXT FILE lengths and DOT FILE sizes must be calculated and the memory set for each one. I do this everytime I send to the sign and seemed like a pain in the ass at first but I came up with a good solution.

    The memory sizes are calculated for each TEXT file and DOT file, the memory is set and then I send the TEXT and DOT files.

    In order to set the memory for TEXT files you need to count the characters (including control CODES), add a small amount to it and convert it to HEX.

    The memory setting for a DOT file is the height and width values converted to hex. These values are then added to a other
    [[ First 2 bytes = # pixel rows ][ Last two bytes = # pixel columns]] = mem setting.


    To SET MEM for a DOT file:(BETABRITE being a filehandle to serial port)
    print BETABRITE "$INIT" . "$WRITE_SPEC" . "\x24" . "$DOT_LABEL" . "DU" . "$DOT_SIZE" . "4000" . "$EOT";

    The breakdown:

    $WRITE_SPEC = Write SPECIAL FUNCTIONS file

    "\x24" = 24H - Set Memory Configuration

    A = TEXT file (41H)
    B = STRING file (42H)
    D = DOT PICTURE FILE (42H)

    U = 55H - Unlocked. Means that the file can be accessed via an IR keyboard.
    L = 4CH - Locked. Means that the file can not be accessed via an IR keyboard.

    $DOT_SIZE = The first two bytes = # pixel rows and the last two bytes = the # of pixel columns in the picture (in HEX).

    4000 = 8-color Color Status (ALWAYS STAYS THE SAME FOR BETABRITE)

    So say we have a 11x7 DOT file we want to program into DOT LABEL "J". Converting the rows and cols values to HEX and joining them together we would get "070E". Without the variables our string would actually look more like:
    JDU070B4000

    To compete the example above:
    print BETABRITE "$INIT" . "$WRITE_SPEC" . "\x24" . "JDU070B4000" . "$EOT";

    In reality you would have more than just the "JDU07B4000". You'd have all your memory settings in the same frame.

    Once ALL your memory settings are sent you would send the actual DOT FILE itself:
    print BETABRITE "$INIT" . "$WRITE_DOT" . "J" . "070B" . "00000080000\r00000088000\r08888888800\r08888888880\r08888888800\r00000088000\r00000080000\r" . "$EOT";

    To SET MEM for a TEXT file:
    print BETABRITE "$INIT" . "$WRITE_SPEC" . "\x24" . "$TEXT_LABEL" . "AU" . "$TEXT_SIZE" . "$RUNTIME" . "$EOT";

    Well set TEXT file "H" in this example:
    Explanation:
    $TEXT_LABEL = H - Label of the text file :)

    A = TEXT FILE
    B = STRING file (42H)
    D = DOT PICTURE FILE (42H)

    U = 55H - Unlocked. Means that the file can be accessed via an IR keyboard.
    L = 4CH - Locked. Means that the file can not be accessed via an IR keyboard.


    $TEXT_SIZE - This needs some explaning. It's the HEX value for the length of the message.

    It gets a little more complicated for TEXT files. In the message we have to count the characters, but also count the MODE stuff too.

    For the example our message is:
    $message="<$ROTATE><$RED> Hello there, how is everybody doing?";

    What I do is read the text message from a file. The variables are surrounded by < and > just like html code. I copy the string into a variable I can work on with without changing the original.

    Here's some code from my scripts to do it:

    #===============================
    # copy  - $message remains the $message sent to the sign, $message2 is or working copy
    $message2=$message;
    
    #make the spaces something
    $message2 =~ s/ /X/g;
    
    # Convert the stuff between < and > back into variables an kill the < and >
    # When the varaibles are read from a file they aren't really variables. This converts them.
    $message2 =~ s/\<\$(\w+)\>/${$1}/g;
    
    # Throw all the characters in a array
    @string = split / */, $message2;
    
    # reset the counter
    $char_count=0;
    
    # Count the characters in the array
    foreach $character ( @string )  {
    	$char_count++;
    }
    # Add characters for before message ( Remember $DPOS ? )
    $char_count=$char_count+4;
    
    # convert count to hex
    $hex_char_count = sprintf("%02x",$char_count);
    
    # make the letters uppercase
    $hex_char_count =~ tr/[a-z]/[A-Z/;
    
    # set the values in the hash
    $text{$label}{textsize}=$hex_char_count;
    $text{$label}{char_count}=$char_count;
    
    #==============================================
    

    I then have the number of characters in both Dec and HEX. We use the HEX value for the memsize.

    44 characters = 2C HEX

    $TEXT_SIZE="002C"


    RUNTIME: 4 characters to set Start and END times - not to be confused with RUN SEQUENCE
    For a TEXT file, the first two characters represent the files Start Time and the last two characters represent the Stop Time. ( See protocol section 4.2 )
    [FF = AlwaysFE = Never]
    $RUNTIME="FFFE"

    Once we have everything ready to go, we can send it to the sign

    Setting MEM for LABEL H....
    print BETABRITE "$INIT" . "$WRITE_SPEC" . "\x24" . "HAU002CFFEE" . "$EOT";

    ...and then send the message
    print BETABRITE "$INIT" . "$WRITE" . "H" . "$DPOS" . "$message" . "$EOT";


    Now the news. All the memory settings (FILE, DOT and STRINGS )have to be set in the same frame. This means having them in a hash is the easy way to go. You can just step through the hash and set them all at once.

    Just group them together and then send the $EOT
    When your are setting more than one, your frame might look like
    print BETABRITE "$INIT" . "$WRITE_SPEC" . "\x24" . "HDU07374000" . "IDU07294000" . "JDU07324000" . "KDU07474000" . "$EOT";




    Setting the Run Sequence

    Once you have SET MEM for ALL your TEXT, DOT and STRING files you can then send your TEXT, DOT and STRINGS. You then need to send a RUN SEQUENCE
    This tells the sign what you want to show and in what order. This list can up to 130 ASCII characters long and is needed in order for the sign to display anything.

    Everytime I write a TEXT file to the sign I throw the LABEL into the end of an array called @text_runlist like so:
    push (@text_runlist,$LABEL);

    When I'm done sending all of the TEXT files I can then copy all the stuff into a varaible called $text_runlist
    $text_runlist="@text_runlist";

    Then all I have to do is remove the spaces and I can create the string to send to the sign
    # remove the spaces
    $text_runlist =~ s/ //g;

    To SET RUN SEQUENCE:
    print BETABRITE "$INIT" . "$WRITE_SPEC" . "\x2e" . "S" . "U" . "$SEQ" . "$EOT";

    \x2e = Set Run Sequence

    One ASCII character that represents the type of Run Sequence order:

    T 54H = All subsequent TEXT File Labels in the Run Sequence will run according to their associated times (default).
    S ( 53H ) = All subsequent TEXT File Labels in the Run Sequence will run in order regardless of each file s run time.
    D 44H = All subsequent TEXT file labels in the Run Sequence will run according to their associated times. Then when the file reaches an off time , the file will be deleted.


    One ASCII character that represents the keyboard protection status:
    U ( 55H )= Unlocked. This allows the Run Sequence to be changed from a hand-held IR keyboard (default).
    L 4CH = Locked. This makes the Run Sequence inaccessible from a hand-held IR keyboard.

    Well say we want to add A B C D and E as an example:

    And send it to the sign in the order then were sent (alphabeticaly)

    print BETABRITE "$INIT" . "$WRITE_SPEC" . "\x2e" "SU" . "ABCDE" . "$EOT";

    or
    print BETABRITE "$INIT" . "$WRITE_SPEC" . "\x2eSUABCDE" . "$EOT";

    Pretty simple
    (See section 3.3.2 for more info)




    Perl Scripts

    TEXT scroller

    bb-scroller.pl

    SUMMARY:
    bb-scroller.pl is a Perl utility that allows the scrolling of text on the
    BetaBrite one line LED Display. It counts the characters and delays
    between lines to allow the line being displayed to completely scroll
    off the display before the next line starts. This allows the displaying
    of any text file or output from a command specified on the command line.
    
    Supports "Titles": If it finds "===" prefixing the line it will treat that
    line as the "Title" until it finds another line with "===". Until it comes
    across another line with "===" it considers each line to be a child of the
    previous "Title".  This was done to make it capable of displaying articles
    from websites and display "Site - Article".  I use this feature with 'yanf'
     and a config file for /yanf' should be included with the script. Yanf can
    be found at http://yanf.sourceforge.net/
    
    Created in Linux. Requires /dev/ttyS*
    
    Example:
    The file contains:
            ===Site 1
            Article 1
            Article 2
            Article 3
            ===Site 2
            Article 1
            Article 2
    This would display as:
            Site 1 - Article 1
            Site 1 - Article 2
            Site 1 - Article 3
            Site 2 - Article 1
            Site 2 - Article 2
    Features include:
     - Automatically strips out HTML code.
     - Reading default file set in script or set from command line. 
    	--file="/var/log/messages"
    
     - Reading of text from command line.  
    	--text="Hello World!"
    
     - Option of running of a command and displaying the output on LED display.
    	 --command="cat /etc/release"
    	
     - Option of setting color. --color=[color]
    
    Requires:
    Download -
    Time::HiRes
  • Download the tar.gz file
  • Untar
  • make Makefile.PL
  • make
  • make test
  • make install
  • And it can handle very large lines and filter out </b>html</b> code <font color="darkblue">like this</font> Script Package - betabrite-scroller-0.4.tar.gz




    Stock quote ticker

    SUMMARY:
    bb-stockticker.pl is a utility that allows the scrolling of stock quotes
    on the BetaBrite one line LED Display. It counts the characters and delays
    between lines to allow the line being displayed to completely scroll
    off the display before the next line starts.
    All the quotes are downloaded in the same transaction and then displayed one
    at a time till completed.
    
    How old are the quotes?
    From http://help.yahoo.com/help/us/fin/quote/quote-01.html
    "Quotes are delayed 15 minutes for Nasdaq and 20 minutes for other exchanges.
    The quote data is updated continuously while the stock markets are open. The
    data displayed reflects the delayed version of the last trade."
    Features include:
     - Option of setting color.
     - Option of displaying stock quotes in different formats.
     - Yahoo will support up to 200 stocks at a time.  Enter multiple ticker
            symbols separated by a space. The script should go there, your mileage
            may vary :)
     - supports Foreign exchange symbols such as "^OSEI", "OTC.TO" and "PRTC.BO"
    
    Created in Linux. Requires /dev/ttyS*
    
    INSTALLATION:
    * edit the Perl script bb-stockticker.pl:
            Configuration items at top of script
            - Serial port name.
            - Sign type and sign address.
            - Set path to lynx and sed (used for quote option only)
            - Make sure the appropriate #! line pointing to your copy of Perl.
    * Download and install Time::HiRes
    Download  - Time::HiRes
    perl Makefile.PL make make test make install
    Script Package - bb-stockticker-0.2.tar.gz



    You may need to set up your serail port. This is easily done by using one of the two methods listed below depending on your setup

    Make sure it's set for the right com port ( ttyS0 = COM1, ttyS1 = COM2 )
    
    # stty version > 2.0
    stty -F /dev/ttyS1 9600 -opost -ocrnl -onlcr cs7 parenb -parodd
    
    # stty version < 2.0
    #stty 9600 -opost -ocrnl -onlcr cs7 parenb -parodd < /dev/ttyS1
    
    





    Site created and maintained by Denis Hruza hruzaden@yahoo.com