FRC2706 / 2020-2706-Robot-Code

The Robot Code for the 2020 FIRST Robotics Competition INFINITE RECHARGE
Other
4 stars 2 forks source link

Colour Sensor #2

Closed nicojopr closed 4 years ago

nicojopr commented 4 years ago

Using FRC provided colour sensor, write software to access the sensor

nicojopr commented 4 years ago

connect the color sensor to the roborio. write some code to read the colors and print out what it sees. how easy is it to distinguish different colors? what distances does this work at? can we read through clear plexiglass? how quickly can we react to the color changes (e.g. reading a spinning wheel) could this be used to read the floor tape colors?

georgetzavelas commented 4 years ago

@nrgill28 Have we tested this and know it works? These tasks are more broad than just merging the code.

nrgill28 commented 4 years ago

I tested the code on the color strip provided in the KOP and it correctly identified each without issue. We'll have to do more testing to answer all the questions above, but as for the subsystem code I think everything is there (Since it's basically just a proxy class for RevRobotics' library)

Answers to some of the questions: It can detect the provided colors very well, works every time as long as the sensor is between 0cm - 8cm away from the surface (LED needs to be on, if it's off it just doesn't work well).

The sensor has a very difficult time trying to detect whites, not sure why more investigation required

georgetzavelas commented 4 years ago

Awesome! Love the additional context.