All pages
Powered by GitBook
1 of 1

Loading...

Navigating Blocks

This section pairs with Unit 1, Lesson 6 from the Intro to Robotics V2 curriculum.

Before getting started, you will need to have the REV Hardware Client or REV Hardware Client 2 installed. It's recommended for new users to install (Released August 2026 for Windows, Mac, and Linux).

The programming interface (Blocks and OnBot Java) is the same for both versions.

Blocks is a visual programming language designed to be new programmer friendly by helping to streamline parts of the process and cut down the risk of common syntax errors. While it appears similar to other visual languages, such as Scratch or Blockly, it is designed specifically for use with the DUO Control System.

Accessing Blocks

REV Hardware Client 2

While connected to a powered Control Hub via USB, open the REV Hardware Client2 . Select the Control Hub to be programmed then Open Console under the Program & Manage option in the Navigation menu.

Program & Manage option in the RHC2

The Robot Control Console (RCC) will open in a separate window.

The Robot Control Console opening as a separate window.

The options for Blocks and OnBot Java should appear at the top alongside the manage option.

The programming and manage options in the RHC2.

REV Hardware Client 1

While connected to a powered Control Hub via USB, open the REV Hardware Client 1. Select the Control Hub to be programmed then the Program and Manage menu.

The options for Blocks and OnBot Java should appear at the top alongside the manage option.

Select Blocks. Let's take a look at the landing page below:

  1. Create a new OpMode

  2. Upload an OpMode

  3. Download all saved OpModes

  4. All currently saved OpModes and information

While on the home screen, existing OpModes can be modified or downloaded. Downloading a copy of an important OpMode is recommended to help prevent a project being lost in the event of accidental deletion, change, or equipment failure. Blocks DOES NOT autosave.

Select the checkbox beside the OpMode you would like to modify first. Then you can select what you would like to do, such as download, delete, rename, or copy.

To create a brand new OpMode, select Create New OpMode.

This will open the menu to name the OpMode and select a sample program. For now the sample should remain BasicOpMode as this will give us an easy to work with foundation to get started.

The name of our OpMode should be easily recognizable and give some indication of what it's used for. When working with a class, it may be helpful to include student or group names in the OpMode to aid with grading later.

This first OpMode we will use for a couple activities in this training section so we can name it myFirstOpMode.

Once we click OK, Blocks will fully open.

Let's take a tour of the Blocks user interface.

  1. Save OpMode - Click this button to save an OpMode to the robot. It is important to save the OpMode any time you stop working on a code, so that progress is not lost. Blocks does not have an autosave feature!

  2. TeleOp/Autonomous - This section of blocks allows users to change between the two types of OpMode: teleop and autonomous.

  3. Categorized Blocks - This section of the screen is where the programming blocks are categorized and accessible. For instance, clicking Logic will open access to programming blocks like if/else statements.

The OnBot Java editor will open as well on the righthand side. Click the checkbox to close this for extra space in the programming area.

In the next section, we'll take a closer look at the different categories of Blocks available. Remember if the correct configuration is not active, some Blocks may be hidden, such as those for motors and sensors.

Enable/Disable OpModes

Programming Space - This space is where blocks are added to build programs. Blocks not currently in the use may be dragged off to the side to be clicked back in later or deleted.

  • Greeting Message - This intro information message may appear when creating a new, empty OpMode. Clicking the ? icon will close this message.

  • Robot Control Console

    Deleting, Renaming, and Downloading OpModes

    Creating a New OpMode

    Navigating Blocks

    OnBot Java Editor

    Navigating Blocks Walkthrough Video

    REV Hardware Client 2
    Navigating to the Program and Manage menu in the RHC1.
    The programming and manage options in RHC1.
    This video uses REV Hardware Client 1.