Coding with the VEX GO LED Bumper

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

GO_Brain-Bumper.png

The following article will cover:

  • How the LED Bumper is Used
  • LED Bumper Color Example Project
  • Detect Object Example Project

Note: In this article, the example projects use the Code Base - LED Bumper Forward 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, such as driving the Code Base in reverse to drive away from a wall.

GOBumperPressStop0090.png

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

_Pressing_bumper__block.png

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

GO_Bumper-Colors.png

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

_Set_bumper_color__block.png


LED Bumper Color Example Project

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

LED_Bumper_Color_project.png


Detect Object Example Project

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

Detect_Object_example.png