######### Joystick

Library: Input/Output
Introduced: 2.2.0
Appearance: #########

Behavior

The user can drag the red knob within the rounded-square area, and the outputs update to indicate the knob's current x- and y-coordinates. This is meant to emulate the joysticks known from the days of classical arcade games.

Pins

West edge, north pin :
Output: Indicates knob's x-coordinate, to be interpreted as an unsigned integer whose value will never be 0. Thus, a value of 1 represents the far left, and the maximum value for the bit width indicates the far right. When the knob is at rest (in the center), the value has the bit pattern 10...00. Bit width matches Bit Width attribute
West edge, south pin
Output: Indicates knob's y-coordinate, The value varies in the same way as for the X coordinate. when the knob is pulled all the way north (up), this output's value is 1, and when the knob is pulled all the way south (down), the output is the maximum value for the bit width selected. bit width matches Bit Width attribute

Attributes

When the component is selected or being added, the arrow keys alter its Facing attributeand Alt-2 through Alt-5 alter its Bit Width attribute.

Facing
The location of the output pin relative to the component.
Bit Width
The number of bits used to indicate each of the knob's coordinates.
Color
The knob's color as it is drawn on the screen.
Background
Case color as drawn on screen.

Poke Tool Behavior

By holding down the left mouse button in the joystick area, the joystick button follows the mouse cursor, and the outputs are updated as you move. When the mouse button is released, the joystick button returns to its rest position.

Text Tool Behavior

None.

Back to Library Reference