views:

602

answers:

8

I'd like to have an application monitor written in C# monitoring a set of Forex trading positions. It would be connected via USB to a real set of "traffic lights" sat on a desk which it would use to indicate system status. Can anybody suggest a good solution?

+2  A: 

Traditionally people have used the X10 automation framework for this kind of thing. People at my company use it to control lava lamps to indicate the status of our continuous integration build.

There's a pointer over at How does one get started writing applications that interact with x10 protocol?

Blair Conrad
+3  A: 

I have used the concepts in this CodeProject article to successfully light up LEDs. It might meet your requirements if:

  • You can use parallel port instead of usb (or maybe usb to parallal cable/dongle)
  • You are ready to tackle some soldering and simple electronic tinkering
  • You can modify the vb code to monitor your status

As the author mentions in the article, you can destroy your computer's parallel port (and worse!) if you are not very careful.

In addition, a good engineer would insist that you isolate the lights from the port to further protect the computer. (relays, triacs, opto isolators, etc.)

That being said, it does work!

Doug L.
+2  A: 

One step further is to build something yourself using a microcontroller platform like the Arduino. Some examples of what is possible with the Arduino platform are available on the Arduino Playground page.

An article on how to make traffic lights using an Arduino is available at Instructables.

Ruben
+5  A: 

Normally I'd say parallel port or some other such thing, but if you've got your hopes up for USB, then definitely have a look at the Arduino. It's a very low cost microcontroller that can run standalone, or can talk to a PC through a number of flexible interfaces (including USB).

It is extremely popular with the hobbyist community, and as such, there are a number of entry-level projects to get one started with the device. Price on Sparkfun is $35 USD for a fully assembled USB-enabled version.

HanClinto
+3  A: 

The easiest solution is to buy a USB traffic light, rather than building one yourself. E.g. USB Ampel. With a simple API included, it would probably be much easier.

Brian
+1  A: 

Try using simple usb experimentation interfaces such as Phidgets (Www.phidgets.com) or the Velleman k8055 USB experimentation board (http://www.velleman.be/ot/en/product/view/?id=351346).

Roel
+2  A: 

Channel9 has a video from the Microsoft PDC showing how some developers use a "Build Bunny" for something similar: PDC2008 ShowOff Entry: Brian the Build Bunny

There's also more information and source code here.

Slapout
+1  A: 

We used this product at my last job to control a set of revolving traffic lights when a build would break on our CI server. The Ethernet is nice so that you are not limited to the 3M range of USB and it is as easy as opening a TCPClient to port 10000 and sending a "1R1\r".

http://www.6bit.com/products/smartrelayE.php?products_id=33

joshperry