Linux on a cash register

<< 013.html Return to index 015.html >>

The nice folks at Ultimate Technology Corp. sent me the docs on the display pole. Those guys rock. The docs are completely full-featured. Turns out that All I needed was to set my script to send data to the serial port at 4800 baud with 8 data bits and no parity. Visions of AT strings from my days of modems and DOS 5.x are dancing in my head... And if being able to send ASCII to the pole wasn't good enough, I can do all sorts of wacky stuff with their control character command set. You can make letters flash (0x1C), set the insertion point anywhere on the 2x20 grid (0x10, 0x00-0x27), reset the display to factory defaults (0x1E), and so on. There's also a vertical scrolling mode which I might look at later. Normally, new text comes in on the lower right and "pushes" text off the upper left. Like a stack of characters or something. But you can toggle vertical scrolling mode to on and then new text comes at the leftmost cell on the bottom row. Stuff that was in the bottom row moves to the top row, and the top row disappears. I've been playing with it all morning.

So in the absence of anything useful to do with my newfound pole powers, I hack up my stockquote script to loop over a list of stock ticker symbols and send the last, day high, and day low prices to the pole. So I can glance over and see what CSCO is at (14.43 as I write this). It's set to go out on the Net and grab a new quote every 60 seconds.

Maybe I've seen stock quotes too much (or maybe I don't care about the market anymore since I had to sell everything off), but the stock quote thing wasn't all that amusing after the first 5 minutes. So I wrote a script which gets weather info for all the cities I care about (including Norwich, England). It grabs the wind speed and direction, temp, dewpoint, humidity, and pressure and displays it on the stick. I don't have a pic of it, but it has the city name on the top and then the various bits of info appear on the row below it once every 5 seconds. That's the only way I could think of displaying stuff. You have to know the city name or the temp and stuff is useless. And you can just have a bunch of numbers next to a city name since that would be meaningless. It's hard trying to display meaningful information when you only have two rows of 20 characters to use.

Next on my list is to write a wrapper daemon of some sort that accepts and reformats input according to some scheme and sends the formatted data to the pole. I could also write something which kicks this off so that it grabs input from the weather thing or the stock thing or syslog or whatever. Then I can add new pole display "modules" as needed. I'd like to get a fortune in there, for example. And it's be nice to have a timer as well. Grabbing the time off the U.S. Naval Observatory's cesium clock would be nice, too. In the real long term, I'm going to make a system that uses 802.11b (or Bluetooth or "regular" RF or whatever) that can tell us what the pH, salinity, and temperature of our spa is. But that's for another day.

Oh yeah: I have my cash register syslogging to the thermal printer now. Eventually, I want Caller ID to get printed. That might be a completely new can of worms, mainly because I need an external modem (which also has to have a pass-through) and a phone line up to my office. Whatever I do, Trey says he has a bunch of paper for me, so I'll be living large pretty soon...