Building a keypad

6 posts / 0 new
Last post
...
...'s picture
Offline
Last seen: 17 years 11 months ago
Joined: Nov 30 2004 - 05:07
Posts: 78
Building a keypad

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 Dirol

Any suggestions or google links on how i could complete this part of my project would be much appreciated.

Offline
Last seen: 5 years 11 months ago
Joined: Dec 20 2003 - 10:38
Posts: 851
I'd buy a cheap USB numeric k

I'd buy a cheap USB numeric keyboad (or PS2) and the wire it's buttons to your keypad buttons.

...
...'s picture
Offline
Last seen: 17 years 11 months ago
Joined: Nov 30 2004 - 05:07
Posts: 78
I'm actually try to wire up t

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

boby_dg's picture
Offline
Last seen: 17 years 6 months ago
Joined: Jun 8 2004 - 15:14
Posts: 102
If you aren't affraid of elec

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

Offline
Last seen: 5 years 11 months ago
Joined: Dec 20 2003 - 10:38
Posts: 851
Re: I'm actually try to wire up t

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.

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.

ex-parrot's picture
Offline
Last seen: 3 years 10 months ago
Joined: Dec 20 2003 - 01:35
Posts: 6844
However, the game port does h

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

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.

Log in or register to post comments