JOYSTICK HAT ANGLE This command will give support for reading up to 4 HAT controllers.
Syntax
    Return Integer=JOYSTICK HAT ANGLE(Hat Number)
Parameters
    Hat Number
Integer The hat controller number to use 0 to 3
Returns
When the hat controller is neutral, a value of -1 is returned. When the hat is being used, the return value is in tens of a degree so north would be zero, east would be 900, south is 1800 and west is 2700
Description
When the hat controller is neutral, a value of -1 is returned. When the hat is being used, the return value is in tens of a degree so north would be zero, east would be 900, south is 1800 and west is 2700.
Example Code
    do

    cls

    print "joystick hat angle(0)"+str$(joystick hat angle(0))

    print "joystick hat angle(1)"+str$(joystick hat angle(1))

    print "joystick hat angle(2)"+str$(joystick hat angle(2))

    print "joystick hat angle(3)"+str$(joystick hat angle(3))

    loop

    end
See also
INPUT Commands Menu Index