Class: Joystick

Joystick()

Class representing a Joystick TinkaTop

Constructor

new Joystick()

Creates an instance of the Joystick class
Source:

Extends

Methods

get_id() → {number}

Get the value of id. ID's are determined by the Tinkamo hardware protocol.
Overrides:
Source:
Returns:
Type
number

get_name() → {string}

Get the value of name
Overrides:
Source:
Returns:
Type
string

sense(command_id, command) → {Array.<number>}

Returns the X and Y positions as distance values from the center ranging from -10 to 10.
Parameters:
Name Type Description
command_id number
command Array.<number>
Overrides:
  • TinkaTop#sense
Source:
Returns:
an array of size 2 containing x and y
Type
Array.<number>