Joystick Toolkit - vrjoystick


: joy = vrjoystick (id)
: joy = vrjoystick (id, "forcefeedback")

Attempt to open a joystick.

Inputs

id - a positive numeric id for the joystick device to use.
"forcefeedback" - String constant to enable forcefeedback.

Outputs

joy - a octave_joystick object.

Joystick Properties

A joystick object has the following properties:

ID

The ID of the joystick as used to create the joystick

Name

The name of the joystick device

Status

Status of the joystick ("Open" or "Closed")

ForceFeedbackSupported

Boolean for if the joystick was opened with forcefeedback enabled and supports forcefeedback.

Joystick Functions

A joystick object provides the following functions:

axis

Get the value of a joystick axis

buttons

Get the state of a joystick button

caps

Get the capabilities of the joystick

close

Close a joystick

force

Set the forcefeedback forces on a joystick

pov

Get the pov values from a joystick

read

Read all state values from a joystick

Examples

Open device 1

 
 joy = vrjoystick(1);
 
 

See also: vrjoysticklist.