Programmable stand-alone button (hardware + software)
I need to have a physical button that, when pressed, will be noticed by my program. There are many types of USB buttons that are preprogrammed to open a website, turn off your computer, etc. And I have seen several projects with buttons and serial port.
But none of them "have all", a simple description of how to put the hardware and a simple description of the code.
I really need a button connected to a serial port that sends a signal when the button is pressed.
I know this question is a crossroads between software and hardware, but when I googled this I saw more people asking this question, they all left unanswered.
Perhaps this question fits stackoverflow?
EDIT: My solution
My application in this case was the que system and I needed a button so people could print the que ticket.
I just took apart an old ps2 mouse and bought me a button ($ 4) and sold two wires from the PCB to the button. Each mouse button has dots on the back of the PCB to which we can connect an external button.
Then in my program I just hooked up the mousebutton-event systemwide to get when the button is pressed, in my case this computer is for this program, so this is not a problem.
source to share
I am looking for the same. this might do the trick:
Haven't tried it yet, but it has code to run a shell command or simulate a keypress and the source code is available in case you need something different.
And for Linux: find the freshmeat dot network for the usb-panic-button-daemon project. (I am a new user and cannot post more than one hyperlink!)
And one more thing I just found is that Griffin makes an SDK available (at least they were, I'm waiting for an answer) for their PowerMate knob to make it simulate more than just keystrokes.
BTW I'm looking for USB buttons, but I can use serial too, think about it.
source to share
It might be worth looking at Phidgets:
http://www.phidgets.com/index.php
They make many small USB I / O devices as well as code examples on the site.