Hardware Overview
What you'll learn
- Identify the VEX IQ Brain (2nd generation) and its ports
- Understand how motors work and how they connect
- Learn about common sensors: distance, bumper, color, inertial
- Know which sensors are most useful for autonomous
Know Your Robot
Before you write a single line of code, you need to understand the hardware you are working with. Think of it this way: you would not try to drive a car without knowing where the steering wheel and pedals are. Same idea here.
In this section, we will walk through every major component on your VEX IQ robot that matters for autonomous programming. By the end, you will know what each part does and why it matters.
The VEX IQ Brain (2nd Generation)
The Brain is the computer that runs your robot. Everything connects to it, and it is where your code actually executes.
What It Looks Like
The 2nd generation VEX IQ Brain is a compact rectangular box with a color screen on top. It has buttons for navigating menus, starting programs, and stopping the robot.
Key Features
- 12 Smart Ports: Numbered 1 through 12, arranged around the edges of the Brain. This is where you plug in motors and sensors. Each port can auto-detect what device is connected to it.
- Built-in Battery: The rechargeable battery is built right into the Brain. Make sure it is fully charged before any competition — a dying battery in the middle of a match is not fun (trust us, it happened to us once).
- Color Touchscreen: Shows device status, battery level, and lets you select which program to run. During autonomous, you will use this screen to pick your routine before the match starts.
- USB-C Port: Used to connect the Brain to your computer for downloading programs and updating firmware.
- Bluetooth: The Brain can connect wirelessly to your computer, which is convenient but sometimes slower than USB.
- Built-in Speaker: Plays sounds when your program tells it to. Some teams use beeps to signal different stages of their autonomous routine, which is really helpful for debugging.
A Quick Note About the 1st Gen vs. 2nd Gen Brain
If you have an older 1st generation Brain, most of what we cover still applies. The biggest differences are that the 2nd gen has a better screen, more memory, and built-in Bluetooth. The programming concepts are the same.
Motors
Motors are what make your robot move. Without them, your robot is just an expensive paperweight.
How VEX IQ Motors Work
VEX IQ uses Smart Motors that can do more than just spin. Each motor has a built-in encoder that tracks exactly how far it has rotated. This is critical for autonomous programming because it lets you tell the motor to spin a specific number of degrees or rotations.
For example, you can say “spin forward 720 degrees” and the motor will rotate exactly two full turns, then stop. That precision is what makes autonomous routines possible.
Drivetrain Motors
Most VEX IQ robots use a two-motor drivetrain — one motor on the left side and one on the right. When both motors spin forward at the same speed, the robot drives straight. When one spins faster than the other (or one spins backward), the robot turns.
In VEXcode, you group these two motors into a drivetrain object, which gives you simple commands like “drive forward 12 inches” or “turn right 90 degrees.” We will set this up in a later section.
Other Motors
Many robots also have motors for mechanisms — an arm that lifts, a claw that grabs, or an intake that pulls in game pieces. For autonomous, you will program these motors to activate at exactly the right moments.
Port Configuration
When you plug a motor into a port, you need to remember which port number you used. Your code references motors by their port numbers. A common setup might be:
- Port 1: Left drivetrain motor
- Port 6: Right drivetrain motor
- Port 3: Arm motor
- Port 8: Intake motor
It does not matter which ports you use, as long as your code matches your physical wiring.
Pro Tip: Write down your port assignments on a piece of tape and stick it on the robot. In the heat of competition, you do not want to be guessing which port is which.
Sensors
Sensors are your robot’s eyes, ears, and sense of touch. They let your autonomous program react to the real world instead of just blindly following a script.
Distance Sensor
The distance sensor uses ultrasound to measure how far away an object is. It works like a bat’s echolocation — it sends out a signal, waits for it to bounce back, and calculates the distance.
What it is good for:
- Detecting walls and stopping before you hit them
- Aligning your robot to a wall at a consistent distance
- Detecting game pieces on the field
Typical use in autonomous: “Drive forward until you are 4 inches from the wall, then stop.” This is way more reliable than guessing a distance, because the robot adapts to its actual position.
Range: Works well from about 2 inches to 40 inches. Beyond that, readings get unreliable.
Bumper Sensor
The bumper sensor is the simplest sensor in the kit. It is basically a button — it is either pressed or not pressed.
What it is good for:
- Detecting when you have driven into a wall
- Detecting when a mechanism is fully closed or open
- Simple “start” triggers
Typical use in autonomous: “Drive forward until the bumper is pressed, then back up.” It is not fancy, but it is reliable.
Color Sensor
The color sensor shines a light and detects the color of the object in front of it. It can distinguish between common colors like red, blue, green, and yellow.
What it is good for:
- Sorting game pieces by color
- Detecting specific field markings
- Identifying which game piece to pick up
Typical use in autonomous: “If the object is red, pick it up. If it is blue, ignore it.” This kind of decision-making makes your autonomous smarter.
Tip: The color sensor works best when it is very close to the object — ideally within an inch or two. It also works better in consistent lighting, so test it under the lights at your competition venue if possible.
Inertial Sensor (Gyro)
The inertial sensor is arguably the most important sensor for autonomous programming. It contains a gyroscope and accelerometer that measure your robot’s rotation angle.
What it is good for:
- Making accurate turns (the number one use)
- Knowing which direction the robot is facing
- Correcting drift while driving straight
Typical use in autonomous: Instead of saying “turn right for 1 second” (which is unreliable because it depends on battery level and floor friction), you say “turn right until the inertial sensor reads 90 degrees.” The robot keeps turning until it hits exactly the right angle, then stops.
Why it is essential: Without an inertial sensor, turns are guesswork. The motor encoders can estimate turns, but they are affected by wheel slippage. The inertial sensor measures the actual rotation of the robot’s body, so it is much more accurate.
Calibration: The inertial sensor needs a few seconds to calibrate when your program starts. During this time, the robot must be completely still. We will show you how to handle this in your code later.
Optical Sensor
The optical sensor detects objects in front of it and can measure their color and brightness. It is similar to the color sensor but has a longer detection range and can also detect the presence of objects without touching them.
What it is good for:
- Detecting objects from a distance
- Counting game pieces as they pass by
- Triggering actions when something is in front of the robot
Typical use in autonomous: “Wait until a game piece is detected in the intake, then stop the intake motor.”
The MVP Sensors for Autonomous
If you are just getting started and wondering which sensors to focus on, here is our recommendation:
Tier 1: Must-Have
- Inertial Sensor — Makes your turns accurate and consistent. This single sensor will improve your autonomous more than anything else.
- Distance Sensor — Lets your robot know where things are. Wall alignment alone makes it worth it.
Tier 2: Nice to Have
- Color/Optical Sensor — Useful when the game involves sorting or identifying objects.
- Bumper Sensor — Simple and reliable for wall detection.
In our experience at competitions, the teams with the best autonomous routines almost always have an inertial sensor. It really is a game-changer.
Labeling and Organization
Here is a practical tip that will save you a lot of headaches: label everything.
- Use small stickers or tape to label each wire where it plugs into the Brain
- Keep a chart of your port assignments
- If you swap a sensor to a different port, update your code immediately
At one competition, we spent 20 minutes debugging why our autonomous was not working. Turns out, someone had unplugged the left motor to charge the Brain and plugged it back into the wrong port. A simple label would have prevented that.
What’s Next
Now that you know the hardware, it is time to set up the software. In the next section, we will download and install VEXcode IQ and get your development environment ready to go.
Head over to Setting Up VEXcode IQ to continue.
VEX Tutorials