Arcade Module

Get the right and left wheel speed values of a robot in an Arcade configuration

Library

Simulink Coder Support Package for ARM Cortex-based VEX Microcontroller/Utilities

Simulink Coder Support Package for VEX EDR V5 Robot Brain/Utilities

Description

Get the speed value for the right and left wheels of an Arcade robot. Arcade-style control of a robot uses both the axes on a single joystick to control the forward and reverse motion and the left and right differential. The first input port maps to the vertical axis on the joystick. The second input port maps to the horizontal axis on the same joystick. The first output is the right motor speed, and the second output is the left motor speed.

The Arcade Module block uses these formulas to determine the motor speed:

  • RightMotorSpeed = min(max((yx),−127), 127)

  • LeftMotorSpeed = min(max((x+y),−127), 127)

Here, x and y represent the position of the joystick.

For example, when the joystick is moved fully forward, y = 127 and x = 0. This results in a RightMotorSpeed value of 127 and a LeftMotorSpeed value of 127, which makes the robot move forward.

Note

The Arcade Module block is not compatible with the Field Simulator block. Avoid using the Field Simulator block with the Arcade Module block in your model.