Main Content

Gamepad Button

Represent one of the 12 buttons on VEX V5 Controller gamepad and read the logical value of the button

Add-On Required: This feature requires the Simulink Coder Support Package for VEX EDR V5 Robot Brain add-on.

  • Gamepad Button block

Libraries:
Simulink Coder Support Package for VEX EDR V5 Robot Brain / Gamepad

Description

The Gamepad Button block is used to represent one of the 12 buttons on the VEX® V5 Controller gamepad, and read the corresponding logical value (1 or 0) based on whether the button is pressed or released.

Ports

Output

expand all

When you press the button, the block output is 1; otherwise (in a released state of the button), the block output is 0.

Data Types: Boolean

Parameters

expand all

You can have a pair of VEX V5 Controller gamepads to control the peripherals connected to VEX EDR V5 Robot Brain.

Before you make the selection, review the labelling of the buttons on the VEX V5 Controller gamepad.

Specify how often the Gamepad Button block should read the logical value of the button.

When you set this parameter to -1, Simulink® determines the best sample time for the block based on the block context within the model.

Version History

Introduced in R2018b