Color Sensor Telemetry
We are going to add several telemetry blocks within our program, but let's start by having our robot tell us how much red, green, or blue it sees when looking at an object with our Color Sensor.
For this we will be using the block from the Telemetry menu. We will need three in total, one for each color, which will be entered in the "key".
The "precision" on the block will be changed to 3. Precision sets the number of decimal places!

To "number" we will add the appropriate block from the "Color" menu:

Adding Hue, Saturation, and Value Telemetry
To add telemetry for hue, saturation, and value we will repeat most of the previous process. However, for "number" we will snap in the matching variable block.

Quick Check!
Save your OpMode and give it a try! How do the values change depending on what color object the sensor is looking at?
Alpha Telemetry
While working on your code, you may have noticed something called "alpha". The alpha value of a surface tells how transparent or opaque it may be.
Using a similar method as before, we can add a telemetry call for the alpha value to see on our Driver Hub.

Last updated
Was this helpful?