Before You Start AS

This page is the starting point for a team that is beginning directly in Android Studio. It describes the Control System setup that the rest of this tutorial assumes, points to the documentation a Java team needs alongside it, and gives a checklist to work through before writing any code.

You do not need to have completed the Blocks or OnBot Java tutorials first.

Supported Control System Setup

This tutorial is written for the officially supported setup:

  • a REV Robotics Control Hub as the ROBOT CONTROLLER, and

  • a REV Robotics Driver Hub as the DRIVER STATION.

Important

Smartphones are not officially supported. They are legal to use in competition, but a team who uses one is responsible for all of their own testing and troubleshooting. Only the REV Control Hub and the REV Driver Hub are officially supported.

Where a page in this tutorial describes more than one setup, follow the Control Hub and Driver Hub instructions unless your team is using one of the smartphone setups below.

Smartphone Setups

Two smartphone setups appear throughout the Control System documentation. Both are covered by the same pages this tutorial links to, in sections labeled for smartphones:

  • A smartphone ROBOT CONTROLLER connected to a REV Robotics Expansion Hub. This setup needs extra steps that a Control Hub does not: renaming the phone, placing it in airplane mode with Wi-Fi on, pairing it to the DRIVER STATION, and enabling Developer Options so Android Studio can install the app onto it.

  • A smartphone DRIVER STATION in place of a Driver Hub. This setup needs the phone renamed and paired, and needs a Micro USB OTG adapter cable to connect a gamepad.

Note

A Control Hub has Developer Options enabled from the factory, so teams using the supported setup can skip the phone-only preparation steps.

Documentation You Will Need

Read or bookmark these before working through the rest of this tutorial. They are the pages that describe the hardware side of the Control System, which Android Studio itself does not cover.

Before Writing Code

Work through this checklist first. Each item links to the page in the documentation that covers it.

Check

Where it is covered

The Control Hub is wired to a 12V battery through a REV switch, and any Expansion Hub, motors, servos, and sensors are connected.

Connecting Devices to a Control or Expansion Hub

The Control Hub and Driver Hub have been renamed to match the team number naming requirements in the Competition Manual.

Managing a Control Hub, Managing a Driver Hub

The Driver Hub is paired to the Control Hub, and the DRIVER STATION app shows the ROBOT CONTROLLER as connected.

Configuring Your Android Devices

A robot configuration file has been created, saved, and activated from the DRIVER STATION, and each device name matches the name your OpMode will use.

Configuring Your Hardware

The Control Hub OS, Driver Hub OS, Hub firmware, and the DRIVER STATION app are up to date.

Updating Components of the Control System

Android Studio is installed and the FtcRobotController project has been downloaded and opened.

Installing Android Studio, Downloading the Android Studio Project Folder

The FtcRobotController project and the DRIVER STATION app both come from the current season’s release.

Downloading the Android Studio Project Folder

A USB Type C cable connects the laptop to the Control Hub’s Type C port, and Android Studio lists the hub as an available deployment target.

Creating and Running an OpMode

Important

Android Studio builds and installs the entire ROBOT CONTROLLER app, replacing the one on the Control Hub. The app it installs must be compatible with the DRIVER STATION app on the Driver Hub, so update both from the same season’s release.

Note

This tutorial deploys the app over the USB Type C connection described above. The Control Hub also broadcasts a Program & Manage Wi-Fi network, used by the Blocks and OnBot Java tools and described in Connecting a Laptop to the Program & Manage Network.