USB7 6 digit LED display kit and OS X

USB 7 is a 6 digit LED display kit controlled by a USB virtual COM port. It's maker is spiffie.org and its manufactered by fundamental logic, where you can buy them in all sorts configuration ranging from fully assembled to just the pcb without mouting holes.
I bought mine from Make Magazine store makershed.com which just sells them a DIY kit.

I liked the kit so much I wrote a review for in Make's store, but I had quite a bit of trouble getting some info on how use it under OS X. So to make it easier for people looking for the same info I decided to make this page.

Assembled and running USB7
Assemled and running USB7

How to get started

Once you have your assembled kit ready, homemade or otherwise. Plug it into your computer. There are reports of problems if you do not plug directly into computer but use a hub.

Once plugged in the Display should show  000000,  if you put it together correct, and is now ready to recive data.
You can send data to it in several ways, one is via a shell, more info on this later and through a terminal emulation program, which is not to be confused the OS X terminal. A terminal emulater is an application for communicating with devices over a serial port, like modems if you are old enough to have tried that.

I found a small terminal emulation app called Zterm, and when you run that you need to select which serial port to communicate with. Your USB7 device should be listed here with a name like usbModem00021 or something along those lines. Select it and start typing away, the display should update as soon as you hit enter. you can send as many chars to it as you like, but only the last 6 will be displayed.

Another way to test it is to open up your OS X terminal. Then cd to /dev and list the content with ls. There you should be able to find your USB7 device, with a name like tty.usbModem00021 or something along those lines.

Once you have the name you can send data to it simply by typing:
echo "test12" > /dev/tty.usbModem00021 the text in "" is then display on the USB7.

An Example

Here is a quick example script that will use the USB7 as clock with special settings for 12.00 to 12.30 and 13.37 - you will have to exchange usbmodem1a21 with the your own value as it is systemspecific.

 

#!/usr/bin/perl

$|=1;

binmode(STDOUT, ":unix")
    || die "can't binmode STDOUT to :unix: $!";

open(TTY, ">:unix", "/dev/tty.Subst_with_specific_name")
    || die "can't open /dev/tty.Subst_with_specific_name: $!";

$count = 0;

while (1) {
        ($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfWeek, $dayOfYear, $daylightSavings) = localtime();
        $theTime = sprintf("%02d.%02d.%02d",$hour,$minute,$second);
        
        if ( $hour == 13 && $minute == 37 ) {
                print TTY " Leet ";
                print TTY "\n";
        }
        elsif ( $hour == 12 &&   $minute < 30  ) {
                print TTY "Lunch ";
                print TTY "\n";         
        }
        else {  
                print TTY $theTime;
                print TTY "\n";
        }
        $count++;
        sleep 1;
}

Last revised: 30.06.2010
© Morten Nisker - contact