Color wheel programs

Does anyone know how i would program the color wheel for the robot. I want it to sense how many times to pass the other colors and stop at a different one (if that makes any sense). Examples on github for the color wheel also work. Thank you for the help.

What language? Are you using Java with the new command-based framework?

Regardless of the language, I suggest using velocity closed-loop control on your spinner motor. It takes a decent amount of power to get the wheel spinning, but if you keep that same output once the wheel is moving it gets going really fast. Velocity control also allows you to stop quick and easy because the motor will automatically run in reverse to stop the wheel. We actually used position control to stop and hold the wheel when we’re done spinning.

java with the new command based framework

I can share what we have, let me know if you have any questions. We used the REV V3 color sensor from the KOP.
ControlPanelSubsystem
RotateWheelCommand to spin the wheel 3-5 times.
SetColorCommand to spin to the correct color.

I don’t understand your question, it doesn’t make sense. Are you asking for help with rotation control or position control?

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