I'm currently working on a weird and interesting hack on my old Pentium II. and I wanted to develop some form of keypad which would consist four buttons. When the user presses a button the button number would be displayed on the screen.
I was inspired by the Game Show system however i am doing this project as part of some form of 'home automation' system
Any suggestions or google links on how i could complete this part of my project would be much appreciated.
I'd buy a cheap USB numeric keyboad (or PS2) and the wire it's buttons to your keypad buttons.
I'm actually try to wire up the game port on my pc to try and see if direct x will be able to 'see' the button being pressed.
If i can get this to work then i think my hack / project will be complete
If you aren't affraid of electronics you could build a parallel port keypad and bring it to life with Qbasic of VB (Or C, C++). I build and relay interface board with wich I'm planning to make a VB controlled robot this way. You could use the same conception, but not for output but for input.
http://www.epanorama.net/circuits/parallel_output.html
http://www.logix4u.net/parallelport1.htm
http://www.beyondlogic.org/spp/parallel.htm
Ah, game ports don't work that way. They aren't serial ports. They have 4 outputs attached to a capactitor and a power supply that switches on whenever the cap drains too far. When you move the joystick, it slides a potentiometer that drains the cap for that axis half to ground. The game port then measures the rate of drain and uses that to guess where the joystick is located. This is why you always had to "calibrate" those old game port joysticks every time you used them.
However, the game port does have provision for 2 (sometimes 4) buttons just wired straight up to it, which DirectX will definitley be able to see![Blum 3](https://www.applefritter.com/sites/all/modules/smiley/packs/kolobok/blum3.gif)
You could also wire up a resistor ladder so that each button acts like a different position on the X axis, this is how the gravis gamepad worked iirc.