Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to have a computer flash a light

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?

like image 964
rc1 Avatar asked Nov 07 '08 14:11

rc1


3 Answers

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.

like image 88
HanClinto Avatar answered Sep 22 '22 18:09

HanClinto


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!

like image 26
Doug L. Avatar answered Sep 22 '22 18:09

Doug L.


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.

like image 25
Brian Avatar answered Sep 24 '22 18:09

Brian