
Need help in reading the joysticks in QB..
My best suggestion would be to use stick calibration. Ask the user
to center his/her stick and press a key. Store the STICK(0) and STICK(1)
values into variables. Run a constant test in the program to see if
STICK(0) or STICK(1) are greater or less than the variables:
If STICK(0) > XCoor then Direction = 4
If STICK(1) > YCoor then Direction = 3
..
Basically, when the user presses up on the joystick, the program
will record that STICK(1) < YCoor. You can also add an invisible square
around XCoor and YCoor to prevent unwanted joystick movement:
If STICK(0) > XCoor + 5 then Direction = 4
If STICK(0) < XCoor - 5 then Direction = 1
I have not used this method in any of my programs, so test results
would be appreciated.