Sensors an FTC robot actually uses
The built-in IMU, touch and magnetic limit switches, colour and distance sensors — and the digital, analog and I2C ports they plug into, including the I2C address trap.
By the end you can
- Match a sensor to the right port type: digital, analog, I2C or USB
- Explain what the Control Hub's built-in IMU measures and where it lives
- Predict what a REV touch sensor reports when pressed and released
- Avoid I2C address conflicts when wiring several sensors
Without sensors, your robot only knows what it was told to do — not what actually happened. A few cheap, reliable sensors turn "drive forward for 1.2 seconds and hope" into "drive until the lift is home, the game piece is in, and the robot is facing the right way".
Four kinds of sensor port
Every sensor plugs into one of four kinds of port on the Control Hub (an Expansion Hub has the same sensor ports). Digital, analog, I2C and encoder ports all use the same 4-pin JST PH connector, so the plug fitting does not mean it is in the right place.
| Port | What it carries | How many on a Control Hub | Typical sensors |
|---|---|---|---|
| Digital | On/off — high or low | 8 channels on 4 connectors (2 per connector) | Touch sensor, magnetic limit switch, beam break |
| Analog | A voltage anywhere from 0V to 5V | 4 channels on 2 connectors (2 per connector) | Potentiometer, some distance sensors |
| I2C | Digital messages between hub and sensor | 4 separate buses | IMU, colour sensor, 2m distance sensor, odometry computer |
| USB | Video and data | 2 USB-A ports | Webcams, vision sensors |
In a 4-pin sensor cable, black is ground and red is power. On digital and analog ports, the blue and white wires are two separate channels, labelled n and n+1. That is why one physical connector is marked "0-1": it is digital channel 0 on the blue wire and channel 1 on the white wire.
3.3V logic
The hub's digital and I2C ports work at 3.3V. REV's sensors are designed for this. Many hobby sensors are 5V parts and need a logic level converter before they will work safely with the hub — check REV's sensor compatibility chart before you buy something third-party.
The built-in IMU
Every Control Hub has an IMU (inertial measurement unit) built in. It combines a gyroscope and an accelerometer to work out the hub's orientation, and the SDK gives you yaw (heading), pitch and roll in robot terms.
- Control Hubs shipped since September 2022 use a Bosch BHI260AP; older ones use a Bosch BNO055. You can see which you have on the hub's Manage page.
- Either way it sits on I2C bus 0 at address 0x28, and a new robot configuration adds it automatically.
- Expansion Hubs shipped after December 2021 have no IMU.
- Pitch and roll stay accurate because the IMU can sense gravity. Heading drifts slowly over time as small errors add up — fine for a match, but it is why teams re-zero heading at the start.
Because the hub can be mounted in any orientation, the SDK's universal IMU interface asks you to describe how the hub is mounted (which way the logo and USB ports face). Get that wrong and "turn left" becomes "tilt sideways".
Limit switches: touch and magnetic
- REV Touch Sensor
- A push button for a digital port. It is active-low: the SDK reads
truewhen it is not pressed andfalsewhen it is pressed. Its LED lights while pressed, which is a quick way to test it. It only uses the n+1 (white) channel.
- REV Magnetic Limit Switch
- A hall-effect sensor that triggers when a magnet comes close — about 10 mm from the top or 5 mm from the sides with the included magnet, and either pole works. Also active-low. Because nothing has to touch it, it does not wear out or get knocked out of position by a slamming lift.
Teams use both as limit switches: they tell the code that a lift has reached the bottom or an arm has reached its stop, so the motor can stop and the encoder can be reset to zero. The programming track's Homing Mechanisms lesson shows the code.
Touch sensor on the wrong channel reads nothing
Because the REV Touch Sensor only uses the n+1 channel, plugging it into the connector marked "0-1" means it is digital channel 1, not 0. Configure it as channel 0 and your code reads a channel with nothing on it. When a touch sensor "never changes", check the channel number before anything else.
Different sensors and cables wire their channels differently, so always confirm with telemetry: press the switch by hand and watch the value change before you trust it to stop a motor.
Colour and distance sensors
- REV Color Sensor V3
- Measures red, green, blue and overall light, plus infrared proximity. It has a switchable white LED to light the target. REV lists a proximity range of about 1–10 cm, and colour readings work best within about 2 cm, so mount it close to where the game piece will be.
- REV 2m Distance Sensor
- A time-of-flight sensor: it times how long an infrared laser pulse takes to bounce back. REV lists a range of 5–200 cm with 1 mm resolution and a 25° field of view. Because it times the light instead of measuring brightness, the colour of the target matters much less.
The 2m Distance Sensor's laser is infrared (invisible) and rated Class 1. The Competition Manual only allows lasers that are part of a sensor, low-energy and non-visible, which this meets — check the current manual if you consider any other laser sensor.
I2C addresses: the trap
Each I2C port is its own bus, and a bus can host several devices — but every device on a bus must have a different address. Most sensors have a fixed address set by the manufacturer.
One more catch: addresses are written two ways. The 7-bit address is the device's real address; the 8-bit form is the same number shifted left one place, so it comes out doubled. Spec sheets mix the two, so check which one you are reading. In 7-bit form, as the FTC SDK uses them:
- The built-in IMU is at 0x28, on bus 0.
- The Color Sensor V3 is at 0x52.
- The 2m Distance Sensor is at 0x29. REV's spec sheet lists it as "0x52", but that is the 8-bit form — the SDK sets it up with
I2cAddr.create8bit(0x52).
So a colour sensor and a 2m distance sensor can share a bus. Two identical sensors cannot — two colour sensors both answer to 0x52, garble each other, and neither reads correctly.
-
List your I2C devices and look up each one's address in its documentation.
-
Leave bus 0 for the IMU unless you have checked the address is different.
-
Give every other I2C sensor its own bus where you can. With four buses and one taken by the IMU, three external I2C sensors fit without any sharing.
-
Only share a bus when the addresses differ — and note that REV does not sell a cable for putting two I2C sensors on one port, so sharing means making a custom cable.
Wire a sensor suite
Your intake needs two colour sensors (one per side), a 2m distance sensor to see the wall, and a touch sensor as a lift limit switch. Wire them to the Control Hub so nothing conflicts.
Wiring challenge
Wire a sensor suite
Add two colour sensors, a distance sensor and a touch sensor. The two colour sensors share an address, so they need different I2C buses — leave bus 0 for the built-in IMU. Put the touch sensor on a digital port. The inspection report must be clear of errors.
Requirements
- Two colour sensors on I2C0/2
- One distance sensor on I2C0/1
- One touch sensor on a digital port0/1
Try the conflict on purpose
Once it passes, move the second colour sensor onto the same bus as the first and read the inspection report. Seeing that error on screen is much cheaper than discovering it as a colour sensor that returns nonsense during autonomous.
For code, the programming track's Introduction to Sensors lesson covers DigitalChannel and reading switches, and REV's Hello Robot guide covers the colour sensor.
Check yourself
A REV Touch Sensor is wired and configured correctly. Your telemetry shows `true`. What does that mean?
Check yourself
Your intake needs two REV Color Sensor V3s, one on each side. Bus 0 has the built-in IMU. Which plan works?
Next
Encoders and the IMU can tell you how far you have driven and which way you are facing, but not reliably where you are on the field. The next lesson covers the hardware that fixes that: odometry.
Sources and further reading
- REV Control Hub specifications — port counts and voltages
- REV: Digital sensors, Analog sensors and I2C sensors
- REV: IMU and Integrated sensors
- REV Touch Sensor specifications and Magnetic Limit Switch specifications
- REV Color Sensor V3 specifications and 2m Distance Sensor specifications
- REV: Using 3rd party sensors — 5V sensors and logic level conversion
- Game Manual 0: Sensor Glossary
- FTC Competition Manual — section 12.7 (lasers and USB devices)
Finished this lesson?
Mark it complete to track your progress.