> For the complete documentation index, see [llms.txt](https://docs.revrobotics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.revrobotics.com/rev-professional-development-technical-path/first-time-programming/navigating-blocks/block-categories-overview.md).

# Block Categories Overview

Blocks is designed to hide the excess options that are not actively in use based on the configuration. This makes it easier to navigate, but there remains some mystery behind what and where everything is.&#x20;

Well we can't go into every block available, let's take a look at the different categories and some use cases for the blocks within them.&#x20;

### Changing Based on Configuration

Before going too far, recall that the active configuration on the Control Hub will effect which blocks are available for certain categories.&#x20;

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2FKu5awwek04e468D7rPXu%2Fimage.png?alt=media&amp;token=fb5a832b-3766-4900-9843-1119609c02cf" alt=""><figcaption><p>An example of how a configuration file changes Blocks</p></figcaption></figure>

For example, having a servo configured for angular mode will show blocks for setting positions, while having a servo configured for continuous rotation will show options for setting power.&#x20;

Some categories, like Other Devices or [Java Classes](#user-content-fn-1)[^1], will no longer be clickable or completely hidden depending on your set up.&#x20;

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2F8LVJz4xISCJrTAd2S2J4%2Fjavaexample.png?alt=media&amp;token=10824228-7478-4f33-97dc-d598426fc41a" alt=""><figcaption><p>Java Classes will be hidden when not in use</p></figcaption></figure>

## Categories

### LinearOpMode

The LinearOpMode category list various [call ](#user-content-fn-2)[^2]blocks for the OpMode, such as the check for if it is active and to wait for the Driver Hub's play button to be pressed. The call to sleep[^3] can also be found here.&#x20;

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2FoBADOI9OLqXZIhUB6jbY%2Flinearopmodeexample.png?alt=media&amp;token=f50d1383-8767-4323-b2f0-55dc46b446dd" alt=""><figcaption><p>Example of LinearOpMode Blocks in Use</p></figcaption></figure>

### Gamepad

The gamepad menu is where all the blocks related to gamepad inputs can be found. The gamepad blocks are grouped based on if they are a float or Boolean input.&#x20;

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2F02UbulobXuQrvUafsB1J%2Fgamepadexample.png?alt=media&amp;token=14f39032-1d94-42fe-9348-e80c37b806c1" alt=""><figcaption><p>Example of Gamepad Blocks in Use</p></figcaption></figure>

### Actuators

The Actuators menu options will change based on the active configuration file. Some default blocks will always be available, such as some PWM[^4] options under ServoController.&#x20;

When a motor is added to a configuration, the blocks to set its power, mode, direction, and more will become available. For servos, those configured for angular mode will show blocks for setting positions while those set to continous rotation will show power and direction.&#x20;

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2FRb6Z5HfC5fbnWw3LuAc4%2Factuatorexample.png?alt=media&amp;token=8df45b09-2ef1-4b01-aa8f-7bb216fddc3e" alt=""><figcaption><p>Example of Actuator Blocks in Use</p></figcaption></figure>

### Sensors

What sensors are available will change based on the active configuration file. Once a sensor is added, different options will appear based on the sensor. Some will have two menu options for more generic sensor use or for a specific manufacturer.&#x20;

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2Fbzy6m9R8WB93SPD5XKQV%2Ftouchexample.png?alt=media&amp;token=dc9986c1-3631-4e9f-b719-9a6abbbbd62a" alt=""><figcaption><p>An Example of the Touch Sensor Blocks in Use</p></figcaption></figure>

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2FCABmjtG6RoGXfZPxQbPh%2Fcolorexample.png?alt=media&amp;token=18ead064-951d-4735-a59e-589d4b196cbc" alt=""><figcaption><p>An Example of the Color Sensor Blocks in Use</p></figcaption></figure>

### Other Devices

Analog Sensors, if configured, will appear under Other Devices. Other device's controls, like the Blinkin LED Driver, will also be available here if configured. If no relevant devices are configured, this menu will not be accessible.&#x20;

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2FXExknnwYNSvNZUJbrHAm%2Fimage.png?alt=media&amp;token=a860d8ab-b2a2-466e-a60e-6be32541a39d" alt=""><figcaption><p>Example of Other Device Blocks in Use</p></figcaption></figure>

### Utilities

The Utilities category is a mix of tools built-in to the SDK[^5] to pair with different blocks while building out the full OpMode. For example, when using a color sensor blocks related to Color, such as finding the Hue, can be found under Utilities to define how the sensor is being used and what kind of data is being collected.

Additionally, here you will find the Telemetry menu to send information to the Driver Hub.

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2FWSQAmqkB4gjtp8bbdV4s%2Futilitycolorexample.png?alt=media&amp;token=c60d144c-227d-48ed-a5a2-00d8b6c8a632" alt=""><figcaption><p>Example of the Color Blocks in Use</p></figcaption></figure>

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2FTcmywRxtub8H0eVijNK9%2Futilityexample.png?alt=media&amp;token=6ebb1922-c353-4bab-b461-9599c12dbd9d" alt=""><figcaption><p>Example of the ElapsedTime Blocks and Telemetry from Utilities in Use</p></figcaption></figure>

### Logic

The Logic Category is the first set of categories that make up the colorful section of Blocks for the bottom half of the list. In this menu we'll find the options for making if/else statements, setting something to "not", and blocks for creating comparison statements, like checking if something is greater than something else.

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2F97sDkiojKVn2yTrIV2ph%2Flogicexample.png?alt=media&amp;token=3627ecab-c9f8-4c66-9469-2b36a53b79a1" alt=""><figcaption><p>Example of Logic in Use</p></figcaption></figure>

### Loops

The green Loops category includes the list for blocks to create repeats within the program. Loops can have different exit conditions, such as only repeating a set number of times or until Stop is pressed on the Driver Hub.

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2F8FEgkbdPg7jpo4GDLq2R%2Floopexample.png?alt=media&amp;token=630e7d35-ccfe-4656-92ac-3c62d7faf116" alt=""><figcaption><p>Example of Loops in Use</p></figcaption></figure>

### Math

Under the Math category there is blocks to make something negative, to add a number to a program, and several options for completing different calculations in the program.&#x20;

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2F79NP5AnGKyXXa6EE22s4%2Fmathexample.png?alt=media&amp;token=a5609112-dc23-45a4-8437-8cfc729f949f" alt=""><figcaption></figcaption></figure>

### Text&#x20;

Similar to Math, the Text category allows the addition of text entries to a code that the robot will read for executing, unlike Comments, as well as formatting options and ways to change the text based on a situation.&#x20;

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2F0DIgDVyLGRuhFvUjOYlR%2Fimage.png?alt=media&amp;token=735c2f03-9268-4bf3-8844-5b695ce6f155" alt=""><figcaption><p>An Example of a Text Blocks in Use</p></figcaption></figure>

### Lists

The blocks found in the Lists category can be used to compile data into one list as it is collected by the robot.&#x20;

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2FpMPA0G0gbmQ2h3MiyVRC%2Flistexample.png?alt=media&amp;token=4e6f4979-f093-4557-b853-96c0e8269d1e" alt=""><figcaption><p>Example of a List in Use</p></figcaption></figure>

### Variables

The Variables category will initially show as blank until a new variable is created, then the options for setting and using the variable will appear. If a variable goes unused when the program is saved and closed, it will be removed upon reopening the OpMode.&#x20;

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2FBfIXojjsrFi0vzTDCjbG%2Fvariablexample.png?alt=media&amp;token=ae8be89b-4600-47ad-b8c2-76d71acc9725" alt=""><figcaption><p>Example of Variables in Use</p></figcaption></figure>

### Functions

The Function blocks allow for code to be separated into smaller chunks making Blocks a little easier to organize and read. Once a new function is created and named, additional blocks will become available to call the function.&#x20;

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2FRNnrsLuWcC5y3KD2FrY5%2Fimage.png?alt=media&amp;token=6fbbe72b-3f43-4f80-9f18-c8eb056ad85b" alt=""><figcaption><p>An Example of an Added Function in Use</p></figcaption></figure>

### Miscellaneous

The Miscellaneous category includes blocks to assist with formatting in the code and to add comments. Comments allow a programmer to make notes without the robot reading them!

<figure><img src="https://3023198990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnKoHwxC0Q1NBpLowZUmu%2Fuploads%2Fv1jqMDg456t3oAGfmDGm%2Fcommentexample.png?alt=media&amp;token=dc52a66f-e0f7-4b81-a0bb-4d4ec34f16b3" alt=""><figcaption><p>Example of Comments in Use</p></figcaption></figure>

[^1]: Used with external libraries, such as for April Tags

[^2]: A call executes a set of premade code within the SDK.

[^3]: A program put to sleep will hold the last input for the set time and ignore any other inputs.

[^4]: Pulse-Width Module

[^5]: Software Development Kit
