Building a keypad

5 replies [Last post]
...'s picture
...
Offline
Joined: Nov 30 2004
Posts: 79

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 Cool

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Offline
Joined: Dec 20 2003
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.

__________________

Dr. Bob
Applefritter Admin

...'s picture
...
Offline
Joined: Nov 30 2004
Posts: 79
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
Joined: Jun 8 2004
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
Joined: Dec 20 2003
Posts: 851
Re: I'm actually try to wire up t

pepicool wrote:

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.

__________________

Dr. Bob
Applefritter Admin

Ex-parrot's picture
Offline
Joined: Dec 20 2003
Posts: 6835
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 Tongue

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.

__________________

Michael