Upgrades

Arcade Drive

In this example code, we changed our drive function to only be on the left stick!

Modified drivetrain function for Arcade Drive

For clarity, the name of the function has been changed to arcadeDrive. In Blocks, this will automatically update it throughout our code once saved.

You can learn about arcade style of driving in Hello Robot!

Dual Gamepads

There are many ways to split robot control across two gamepads. We recommend testing different combinations with your team to decide what feels the most comfortable to you!

Our example here splits driving onto gamepad1 and all launcher controls to gamepad2. If you decide to split up controls differently, all that needs to be done is the preferred gamepad needs to be chosen from the dropdown menu.

Example of updating the gamepad for the feeder

Gamepad controls are found in the manualCoreHexAndServoControl, setFlywheelVelocity, and splitStickArcadeDrive functions. Below is how the launcher controls look once changed for this example.

Manual servo and Core Hex controls on gamepad2
Flywheel controls set to gamepad2 - manual and auto

Remember to make sure the check for the servo is updated to reflect the correct gamepad as well!

Servo check updated for gamepad2

Mecanum Drive

Upgrading to a Mecanum Drivetrain (REV-45-2470) allows for new kinds of movement, giving the robot the ability to strafe side-to-side across the field.

For Mecanum Drive each wheel has an individual motor!

REV's Mecanum Drivetrain Kit V2

Upgrading from the FTC Starter Kit V3.1 to Mecanum Drivetrain V2:

The following additional parts are needed:

Full build instructions can be found here!

Example Mecanum Drive Program

How a Mecanum Drivetrain is programmed largely depends on the driver's preference for how the gamepad is configured.

In our provided example, the left joystick controls forward/back and strafe then the right joystick controls turning. This code is based on the sample provided by FIRST in Blocks (BasicOmniOpMode).

Mecanum Demo Blocks Code:

Mecanum Configuration - Control Hub and Expansion Hub

When adding an Expansion Hub, you will need to create a new configuration file.

Port Type
Hub
Port
Device Type
Name

Motor

Expansion

0

REV Robotics Ultraplanetary HD Hex Motor

frontLeft

Motor

Expansion

1

REV Robotics Ultraplanetary HD Hex Motor

backLeft

Motor

Expansion

2

REV Robotics Ultraplanetary HD Hex Motor

frontRight

Motor

Expansion

3

REV Robotics Ultraplanetary HD Hex Motor

backRight

Motor

Control

2

REV Robotics Core Hex Motor

coreHex

Motor

Control

3

REV Robotics Ultraplanetary HD Hex Motor

flywheel

Servo

Control

0

Continuous Servo

servo

A full tutorial on programming mecanum is available here! Your team may need to do some testing to account for any changes in configuration or building of your mecanum drivetrain.

Last updated

Was this helpful?