Coding with the VEX GO LED Bumper

The VEX GO LED Bumper is used to detect physical contact and display colors.

LED Bumper with its cable plugged into one of the Brain's Smart Ports.

Note: In this article, the example projects use the Code Base - LED Bumper Top GO Build.


How the LED Bumper is Used

The LED Bumper is used to detect physical contact and display colors. When the LED Bumper is pressed, it can be used to trigger a behavior. For example, the LED Bumper can be used to start or stop the Drivetrain when pressed.

Diagram of a hand pressing the LED Bumper on a GO robot.

The <Pressing bumper> block is used to determine if the LED Bumper is pressed.

VEXcode GO Pressing bumper block that reads bumper pressed?

Or, to display a certain color. The colors the LED Bumper can display are: off, green, and red.

Side by side diagram of the LED Bumper piece, showing it glowing green, red, and off.

The [Set bumper color] block is used to set the LED Bumper to a certain color.

VEXcode GO Set bumper color block that reads set bumper to red. The block's dropdown menu is open to demonstrate that the color can be changed to red, green, or off.


LED Bumper Color Example Project

The code below will set the LED Bumper color to green if pressed, and red otherwise.

VEXcode GO blocks project that will change the Bumper's color if it is pressed. The project reads When started, forever if bumper pressed then set bumper to green, else set bumper to red.


Detect Object Example Project

The code below will drive the Code Base away from an object once the LED Bumper is pressed.

VEXcode GO blocks project that will drive the Code Base forwards until the Bumper is pressed. The project reads When started, drive forward, then wait until bumper pressed. Finally, stop driving and then turn right for 90 degrees.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: