How to code the Limelight after setting the configuration in the OS?

so basically i am trying to code my limelight in such a way that the servo motor should rotate according to the position of the sample i have set the pipeline for a particular coloured sample but i am confused how to programme it. please do help in the comment section below

Where in this process are you getting stuck and want some help?

Do you know how to turn on and off your servo motor at a particular angle or position?
A PID controller is typically used in this case and usually like this:
*Find the angle to rotate from the LL
*Determine the robot gyro position that corresponds to the desired rotation to the target - that’s the setpoint of the PID controller
*Compute the difference (error) of where the robot (gyro) is and where the robot (gyro) should be.
*Multiply that error by a proportionality Kp that converts angle to voltage of the motor

  • Loop until you are close enough (tolerance).
    WPILib can help with the PID controller but it’s so simple that often teams code their own few statements.

i am trying to find the angle but we are unable to find it can you please help

The Network Tables API link I posted for you has this:

tx double Horizontal Offset From Crosshair To Target (LL1: -27 degrees to 27 degrees / LL2: -29.8 to 29.8 degrees)

Is that not the angle that you are trying to find?

1 Like

yes sir but the solution you suggested is compatible with FRC bot and not with ftc. Auto Align Claw Test | 23513 I.N.T. Robotics | FTC Open Alliance Show #robotics this is the reference of the control we are trying to do if you have any suggestions please let us know thank you

Similar to the FRC link I gave you there is a FTC link. What has gone wrong following those instructions? FTC Programming Quick Start | Limelight Documentation

You can try adding FTC in your tag or title and maybe you’ll get the appropriate responders (I don’t do FTC). I did see you where working with a servo but that wasn’t a clear enough clue to your intended use case.

You may find this thread helpful:

They go into a fair bit more detail than INT did.

yes sir. we are trying to align the claw with the sample so do you have any suggestions on how to do that…?