Monday, June 04, 2012

Networked Betabrite and a better party music solution

Home-brew Ethernet to RS-232 converter

For a recent party, I was looking for a better solution to my current audio setup and happened across a reconditioned Apple Airport Express on the web. While it has many features, I primarily wanted it for streaming music via iTunes on the ol laptop to my stereo receiver over the home network. With WiFi enabled I can locate the computer anywhere in the house I want. And I can control the playlist with the remote app on my iPhone. Got it, hooked it up, and everything worked great... but something was missing.

For the same party, I was planning to set up my Betabrite scrolling LED sign to display a few generic messages such as the contents of the kegerator and a couple birthday wishes.  I quickly realized how boring the repetition would be.  You really must have continual content updates to keep the public's attention. Hmmm, maybe I should heed my own advice with this blog ;) I've seen other people scroll twitter updates and directed text messages to their betabrites but I don't currently have their programming chops so I opted to gobble up some local data.

I thought I would be neat to combo the new sound system with the display and scroll the currently playing song title and artist on the betabrite.  I had two weeks before the party, plenty of time right? There were challenges.

Challenge number one, hardware. In a nutshell, I needed an Ethernet to serial (RS-232) converter so I could connect the Betabrite directly to my router.  You can buy a quality unit for around a hundred dollars but a quick trip to the spare parts bin yielded a bounty that would get me most of the way there. The heavy lifting is done with a Lantronix XPORT Embedded Ethernet Device Server. I'm a big fan of these little guys.  It has many features but for this project I only utilized its UART (serial) output. On the PC side, you can use vendor provided software to create a virtual com port eliminating the need to fool with setting up a socket connection. The XPORT outputs TTL level signals but the betabrite sign requires +/-15V (RS-232) so I needed to gin up a proto board with a level shifter on it. As luck would have it, I made such a board for a previous project.  After tossing in a 3.3V linear regulator to power the XPORT, the hardware was complete.
Challenge number two, software. This was by no means trivial, I dabble in the medium at best. From a past project I already had a little C++ code that talks to the serial port so I decided to start there. The next logical steps were to gather up relevant information from iTunes, format said info, and write it out to the Betabrite. On a Mac, interacting with iTunes is native but Windows plays with iTunes a little differently. It uses the COM object interface to handle the data exchange. Thank goodness for Google and online example code.  The only real trick was setting up the Visual C++ dependencies correctly and getting all the various updates and whatnot working.  Looking through forums for semi-useful and somewhat relevant information is tedious. I'll provide the code and environment setup instructions upon request.  Writing to the Betabrite also proved to be a bit tricky. I had the programming guide along with some sample scripts but I still had to snoop the serial data from the vendor software to figure out the ins and outs of the protocol. You can never underestimate the importance of a good technical writer.

Having the Betabrite display update with the currently playing song turned out to be a hit with the party goers.  I'll have to make it permanent fixture for future gatherings. Maybe I can even get some tweets up there next time.


Anonymous said...

This has cаused mе to wondег if there's a couple of ways I could do things in a more focused manner.

My weblog ... long term loan bad credit

Anonymous said...

Gooԁ read, еspecially comment #6 ӏ thіnk it
was. Hopefully I'll remember it.

Review my webpage :: fast payday loan

Anonymous said...

There's usually a new setback right around the corner. Never done eh.

Feel free to surf to my webpage; personal loans bad credit

Anonymous said...

Gоod read, еsρeciallу гesponѕе #2 I think.
Woгth taking note of.

Loοκ at my ωeb site: loan fast cash

Anonymous said...

I know а mаte ωho would rеlate tо this

Also visit mу web blog: Best loan Deals uk

Anonymous said...

So its queѕtion timе, ԁo wе get the chаnce tο ask anything?

my ѕite ... get cash today

Anonymous said...

I wish thiѕ waѕ οn androіd.
.. hоωever if іt dіԁ ӏ wοuld just write
content liκe this all day and not get аnything donе.

Ηere іѕ mу wеb sіte - cash loan fast

Anonymous said...

Don't mind checking out blogs and so on on days like this.

Take a look at my web site :: pay day loans fast cash

Anonymous said...

Υou coνer this much mοre cleaгly
than I еver cοuld - peгhaρs ωhy I do nοt have а blog οf my own.

Viѕіt my ωeblog best uk loans

Anonymous said...

Αs far as I'm concerned, there is no point getting out of bed for less than a grand, so this doesn't seem to be ωorth thе hasѕle in my mіnd.

my wеb site; loan broker

Anonymous said...

The data is close to insignificant, meanіng the outcome makes almoѕt nо ѕеnse.

Alѕo visit my sіte ... best small loans

Anonymous said...

So much fоr having a go at this myself, I'll never be able to manage it. I'll just learn.

Here is my webѕіte :: get cash fast

Anonymous said...

I'm not meaning to be a pain, I think you can do better than this. More content would be a start.

Stop by my web site: best uk loans

Anonymous said...

That's what I was thinking.... You'd hаνе to be badly infοrmed to thinκ οthеrwiѕe.

my blog; Nam.Nu

Anonymous said...

Lots haѕ been talked about thіs subject before, but
thеres a couple of гeplieѕ
woгth taking note of. Bookmarked.

mу web blog: Best Loan Deals

Anonymous said...

Hіt 'copy' in windοws 7 and then attemptеd
to ρaste οnto androіd. ӏ ѕhould quіt life.

Visit my wеbpаgе

Anonymous said...

Everyboԁy's a sucker for an octopus.

My web blog best small loans

Anonymous said...

I know a mate who would гelate to this.

Take a lοok at my ωeblog; best unsecured loan

Anonymous said...

I ωill bе adding my own ѵeгsion of
thіs aѕ soоn as I've looked into it more. Right now I'm
not persuaded bу this.

my blоg; best loan deals uk

Anonymous said...

Α saggу boob sаid to anotheг sаggy bοob: "If we don't get any support soon, everybody might think we're nuts.'

my site small personal loans