Coding with the VEX GO Brain

The VEX GO Brain is used to detect acceleration and rotation.

Diagram of the GO Brain battery, illustrating its components and connections, used in coding tutorials for the GO category.

Note: in this article, the example projects use the Code Base GO Build.


How the Brain is Used

Illustration of the GO Brain-Powered logo, featuring a stylized brain and circuit design, representing coding tutorials in the GO category.

The Brain has a built in Gyro and Accelerometer. These are used to detect acceleration and rotation.

The Brain can detect:

Graph illustrating the acceleration of a block, showing the relationship between force and acceleration in a coding tutorial context.

Acceleration.
The Brain can report acceleration of each of the three axes using the (Acceleration of) block.

Diagram illustrating the BrainAxis feature in the GO Coding Tutorials, showcasing its key components and functionalities for users to understand how to implement it effectively.

The Brain reports acceleration on three axes. The x, y, and z-axis. Each axis has a positive and negative direction.

Screenshot of a coding tutorial interface showing the 'Drive heading' block, with various code elements and a sidebar for navigation, illustrating features relevant to the 'GO' category.

Heading and Rotation.
The Brain can report the heading value in degrees using the (Drive heading) block.

Diagram illustrating the GO Brain Compass, used in coding tutorials to enhance understanding of programming concepts and navigation within the GO framework.

The heading value reports a range from 0-359.99 degrees. The value is reported from a clockwise turn.

Diagram illustrating drive rotation mechanics, showing the relationship between various components. Relevant to coding tutorials in the GO category.

The Brain can report the rotation value in degrees using the (Drive rotation) block.

Diagram illustrating the rotation directions of the GO Brain, used in coding tutorials to demonstrate movement mechanics.

The rotation value reports positive values when rotated to the right, and negative values when rotated to the left. Rotation values are cumulative, and are not capped at 0 or 360 degrees. They will continue to increase or decrease as the rotations accumulate.


Report Acceleration Example Project

Screenshot of a report acceleration snippet from VEX Robotics coding tutorial, illustrating code structure and key components for enhancing program performance.

The code below will report the acceleration value of each axis as the Code Base is rotated.

Screenshot of a project markup report showing acceleration data and coding tutorial elements, illustrating key concepts in the context of the GO category.

The Print Console can be used to see the acceleration value changing in real time.


Report Heading and Rotation Example Project

Screenshot of a report rotation snippet from VEX Robotics coding tutorial, showing code structure and example usage for programming tasks.

The code below will report the heading of the Code Base’s Drivetrain and the rotation value as the Code Base turns.

Mockup of a report heading and rotation feature in a coding tutorial, showcasing a user interface design with labeled sections and visual elements, demonstrating functionality in the context of coding tutorials under the GO category.

The Print Console can be used to see the heading and rotation values changing in real time.

Notice that the heading values are reported clockwise between 0-359.99 degrees, because the Code Base is turning right. Rotation values are cumulative, they will continue to increase (right rotation) or decrease (left rotation).

Screenshot of a report rotation feature in a coding tutorial, displaying options for rotating a report to the left, with buttons and settings highlighted for user guidance.

Adjust the [Turn for] block in the project to change the direction from ‘right’ to ‘left’ and Start the project again.

Mockup showing report heading and left rotation feature in VEX coding tutorial, illustrating layout and design elements for effective programming.

In the Print Console, notice that the heading values are reported clockwise between 0-359.99 degrees, because the Code Base is turning left. The first turn left 90 degrees is reported as a heading of 270 degrees. The rotation values continue to increase with each rotation, however, since the Code Base is turning left, the rotation values are reporting negative.

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

Last Updated: