Skip to main content

Setting Up JAR Template

Installation

  1. If you haven't already, download Vexcode Pro V5 or the VEX VS Code Extension and follow the Install Wizard's instructions to install.
  2. Download JAR-Template by visiting the latest releases page and clicking the "JAR-Template.zip" file.
  3. Import the "JAR-Template.zip" file in either VS Code or Vexcode Pro V5.
  4. VexCode will prompt you to choose a name for your new JAR-Template project. The actual name is unimportant, just enter something memorable and click "Import".

Motor Setup

VS Code Extension

  1. Go to \include\robot-config.h and add all of your motors using the format extern motor LeftFront; without quotation marks, for each motor. The above line declares a motor named LeftFront.
  2. Go to \src\robot-config.cpp and add all of your motors using the format motor LeftFront = motor(PORT1, ratio6_1, false);. The above line defines a motor called LeftFront plugged into PORT1, with a 600 RPM cartridge, not reversed.

Vexcode Pro V5

  1. Click the port icon in the top right corner of the app.
  2. For each motor, choose "Add a Device" and choose a name, port, cartridge, and direction for your motor. Unlike in VS Code, this configurer will update robot-config.cpp and robot-config.h automatically.

Chassis Setup

  1. Go to \src\main.cpp and follow the directions, starting at the top of the file, to set up your chassis. Importantly, do not add motor groups, ports, or sensors that are not in the file already.

User Control Programming

  1. In \src\main.cpp, scroll down to the void usercontrol() function and write your driver control code. JAR Template takes care of your chassis control, with a choice of tank, arcade, and holononmic drive, but you'll need to code any other motors, mechanisms, and sensors yourself.

  2. Test that your motors are set up and reversed properly by downloading and running the project and driving it around.

  3. As a final check, run one or more of the example autons and check that they behave as expected.