Connecting  joystick to a computer.

Check the Computer Engineering area of the Hila Projects Page for more information.

Connect the wire from the aluminum sheet to pin 1 on the gameport.

Each of the other wires (4) connect through resistors to pin 3 on the gameport.

Suggested resistor values:

R1 - 1K to 5K

R2 - 20K to 40K

R3 - 50K to 70K

R4 - 80K to 100K

More Qbasic coding information here: Hila Projects

 

Qbasic Code: (displays numbers generated by joystick and resistors)

CLS
DO

   a = STICK(0)
    PRINT a

LOOP