Limelight and gyro sensor

I am a beginner programmer for my rookie team and i was wondering if anyone could help me with vision programming. What we basically want to do is have a Limelight and a gyro on our robot and we want to have a button on our SmartDashboard that is red until our robot sees that it is in range of the target that we are shooting at. When it is in range we want to press a button on the controller that will line our robot up at the right angle and shoot the balls. I could use any help possible I am completely lost

1 Like

We use command based, and have basically all the stuff you need to do.

Here are the basics of what I would recommend:

  1. Create a vision subsystem
  2. In the periodic method of the subsystem, check whether you have a valid target etc.
  3. Make a network tables Boolean entry available to the dashboard (we use Shuffleboard)
  4. Bind a button to a command group that will rotate to the target and shoot

We do most of those things, though we don’t couple align and shoot to one button because we shoot from multiple distances and haven’t worked that out yet.

In our code you’ll see the vision subsystem, the RotateToTarget command, that should get you close to what you need if you are using command based.

Thanks so much this should help a lot.

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