Skip to content

Introduction

Michael P edited this page Jan 16, 2019 · 10 revisions

Welcome to ARC-Core!

ARC-Core is a shared codebase for Andover Robotics that includes helper classes, functions, and system abstractions. This page will guide your installation and initialization of ARC-Core for your team.

Problem with this page? Create a new issue.

Prerequisites

Before proceeding, your computer must have the following:

  • The latest version of Android Studio
  • The Git versioning system (Download here)
  • A USB-A port for wired uploads (the rectangular one, where orientation matters)

You must also have a personal GitHub account in order to contribute to your team's code. Sign up here.

Disable Instant Run

It is imperative that you disable Instant Run in Android Studio before uploading. Follow this guide to disable it.

Import the project into Android Studio

When Android Studio first starts, it will prompt you to install the Android SDK and the emulators. Select the Standard setup type.

Selecting the Standard setup type

Unless you plan to do additional Android development on your own, follow the configuration below in order to save storage space.

Untick Android Virtual Device and Performance

Android Studio will eventually install the libraries you have selected. This will take a while. Afterwards, you will be greeted with the startup screen. Select Check out project from Version Control, and select GitHub at the dropdown (or alternatively, select Git and click Log in with GitHub at the left bottom corner):

Android Studio startup menu

Change Auth Type from Token to Password, and enter your GitHub account credentials.

Logging in with GitHub

If the entered credentials are correct, the following dialog will be shown. Ensure that you are either the owner or a collaborator of your team's repository. Then, select the team repository using the URL dropdown (highlighted), choose a local location to store your team's code, and click Clone.

Repository selection dialog

If Android Studio prompts you to import an existing Gradle project, do so. It will perform a Gradle build:

Performing the Gradle build

During the Gradle build, errors like the following may occur:

Missing target error

Whenever you encounter these errors, clicking on the tip below the error will usually solve the problem. You may also encounter the following dialog:

Gradle Update recommended

Newer Gradle versions are okay, but make sure that Instant Run is turned off before uploading.

Within 1 minute, the Gradle build should be complete.

Testing our Examples

On the left side of Android Studio you will find the Project tab. If your Gradle build succeeded, you may navigate to our Drivetrain usage examples:

Package located under TeamCode/java

To open a Java class, perform a double click on it. To upload it onto the Robot Controller (NOT the Driver Station. Double check!), plug the phone into your computer and click the Run button at the top right corner:

Uploading code

Clone this wiki locally