Visual Basic Joystick Control

The 15 pin joystick gameport on a PC is a sophisticated
anolog-digital converter capable of monitoring a variable resistance between
0 and 100,000 ohms.

Using this port and visual basic it is possible to create
powerful, graphic applications to monitor temperature, light levels, motion,
stress and any thing that can be monitored with a changing resistance.

To use your gameport with Visual Basic you must install
a joystick control. There are many available on the internet as shareware
or freeware.

If the above URL has changed, search the Mabry site for
their Joystick control at: http://www.mabry.com

After downloading, run the self installing file.
This will load the needed controls in Windows/system

Using the Joystick Control

1. Connect a joystick to your computer. (Must be installed in Control Panel)

2. Start Visual Basic (5 or 6)

3. "right click" on the toolbox - select "components"

4. Select the "controls" tab.

5. Scroll to Mabry Joystk Control, tick the box.

6. A Joystick control should appear in the toolbox.

7. Add a Joystick control to the form. ("double click")

8. Add two text boxes to the form.

9. Double click on the Joystick control (open code window).

10. Select "move" in procedures/events box ("button down"
and "button up" are the other options).

11. Enter these two lines of code to "read" the x and
y axis of the joystick:

Text1.text = XText2.text = Y

12. Run

As you move the joystick, the numbers displayed in the
text boxes will change with the motion.

Your computer is measuring and displaying the resistance
created by your joystick. Replace your joystick with a thermistor
and you are measuring temperature. Replace your joystick with a photo
resistor (CdS cell) and you can create a security system or precision race
timer.