Where do I connect the Color Sensor?

I’m trying to figure out where to connect the REV Color Sensor V3 for the color wheel for the FRC Infinite Recharge competition. I know its supposed to be connected to the I2C port on the RoboRIO, but there is something telling me to connect it to the motor controlling the wheel

Because to me, it makes sense to connect the color sensor port to this AndyMark built-in encoder, that way values are being sent to the motor itself rather than to the RoboRio, and trying to link the two electronics via two separate commands, one for detecting color values, and one to run the motor. That’s my logic

So its either the I2C port or the motor

If anyone can help me understand where to connect the color sensor, that would be great.
Thank you!!!

you would connect it on the roborio, and you would write the code to stop the motor on the correct color… I have no clue have encoder this is, but our team put it on the rio, and did it that way

It must be plugged into the I2C port on the roboRIO. Check out the Using the Color Sensor V3 for Infinite Recharge Video, software libraries, and example code under the FRC 2020 Infinite Recharge Resources section of the product page.

Your mental model of the world has the overall information flow correct, but makes some assumptions which are false.

Yes, information needs to flow from the sensor, and eventually into the motor controller, to cause motion.

However:

The sensor is designed to provide information about the relative Red, Green, and Blue light levels detected over an I2C bus.

In order for this information to be meaningfully consumed by any user, the user would have to be able to:

  1. Electrically integrate with the I2C bus (ie, create or measure changing voltages)
  2. Create the bit sequences to send and receive to extract the info from the sensor
  3. Transform red, green, and blue light level values to other numbers which relate to motor motion

There is no motor controller in FRC that satisfies these three requirements. Therefor, connecting directly to a motor controller is not an option.

However, a roboRIO running Rev’s driver software, and some custom user code, does satisfy the requirements.

At a broad level, this action of bridging information from one source to another, and transforming it appropriately along the way, is a job very well suited for microcontrollers with custom software.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.