I've got a potential client who wants a database driven app, either in Java or Python driving MySQL or PostgreSQL, but we need to get input from an external machine, such that every time this external machine closes a microswitch, a value in the database gets decremented and it shows up on the app.
Also, when that value in the database reaches zero, we want to turn on a light on the external machine until the operator does something in the GUI, and then we want to turn off the light.
My client's proposed solution is to wire the microswitch into one of the keys on the keyboard and just avoid using that key for anything else (he suggested the F12 button), and to control the light by playing a sound file through the left channel to start it, and the right channel to stop it.
That seems a little cheesy to me, especially the wires going into the keyboard - and not just cheesy, but also a potential source of hardware problems if the operator accidentally pulls out a wire. I'd much rather something that either went into the USB port or possibly an internal card, just to keep the wiring around the back and away from the operator. But since the client hopes to sell a lot of these, he wants to keep the price down.
I realize this isn't strictly "programming", but it's to solve a problem in a program I'm writing. So I'm asking you: is there a cheap hardware device that would do what I want?