Color wheel

How would I start programing a wheel that’s supposed to spin to spin the color wheel?

Is this just for practice? Because the color wheel isn’t relevant to this year’s Infinite Recharge @ home challenges.

That being said, if you wanted to do it (and I’m assuming had a color sensor to track the current color), I’d have a variable that tracked the number of times the color changed, and once the variable gets past 24 (the minimum needed for position control, since you need to spin the wheel 3-5 times, and it’s divided into 8 segments) I’d just power the wheel off (nothing fancy).

For position control, I’d do the same thing, but shut off when the desired color (provided in the game data is reached. It might also be helpful to have the motor you’re using to spin it in brake mode, so that it doesn’t accidentally overshoot.

Hope this helps!

we want to do it manually, we have a go pro to see the color wheel

Im also using labview

Ah, I’m not too familiar with labview, sorry :frowning:

That’s ok, thank you anyways.

Just out of curiosity, how are you using a go pro

If it were me, I would have a color sensor pointed at the table, and spin it until you reach a color, then stop.

For the continuous rotation, I would probably have a sequence in code that counted the number of times a color appeared, then spin it until it has appeared 4 times or so.

I believe there was a color sensor in the KOP last year

4 Likes

we were gonna spin it manually and use the go pro to look at the colors to know when to stop

I assume the driver can see the video from the go pro in real time?

I think you could use a selector block, and drive it off of a joystick button. If the button is pushed, choose 50% motor power (or something like that). If the button is not pushed, choose 0% motor power. Send that output from the selector block to the motor controller.

An even simpler answer is to just send some joystick to the motor.

In either case, the driver has to manipulate the joystick or button until the color appears correct, then stop. No sensor needed .

WRT the GoPro itself… People have suggested using them in the past, but usually chosen not to as it’s hard to view their output in real time while not violating rules about wireless communication. I think some folks would be curious if you found a way around that

What do you mean by this?

At in-person event competitions the only wireless allowed on a robot is the robot radio.
Go Pro’s need special permission to be used and must have wireless turned off.

e.g., the 2021 rules are:


So generally to do this you’ll need to use a webcam wired into the robot.

1 Like

Thank you.

I’d consider using one of the game controller triggers as the speed control for the motor turning the color wheel.
Then in LabVIEW it’s just Joystick Axis 3 -> Motor Output

we have a joystick

Are you going to use the joystick axis or some of the buttons?

Button.

So something like this is what gerthworm suggested:
ButtonMotorControl

1 Like

thank you

How would I use this for a color sensor?

It can get a bit more complicated to automate because of the random color, but there are a couple of examples near the very bottom of this page: Team358.org - Robotic Eagles - FIRST® Robotics Competition