Gamepad Accelerometer
Read analog value from VEX gamepad accelerometer
Add-On Required: This feature requires the Simulink Coder Support Package for ARM Cortex-based VEX Microcontroller add-on.
Libraries:
Simulink Coder Support Package for ARM Cortex-based VEX Microcontroller /
Gamepad
Description
The Gamepad Accelerometer block is used to read an analog value from the VEX® gamepad accelerometer based on the axis of rotation (x or y) of the gamepad.
The output for this block ranges from –128 to 127. There are two accelerometers on the VEX gamepad, and their axes are aligned perpendicular to each other. Rotation of the VEX gamepad along either the horizontal axis (1) or the vertical axis (2) results in an output value in the range –128 to 127. You can use this analog value to control peripherals, such as a DC motor, that are connected to the VEX microcontroller.
Ports
Input
Output
Parameters
Extended Capabilities
Version History
Introduced in R2016a