Limelight Closest Target Code

For teams using limelight, I wrote a pretty simple piece of code for the 2020 game (and probably others).

Essentially, you pass in set distance values for the robot to move to, and the code will automatically move the robot to the closest one; for example, if you pass in distances of 5, 10, and 15 (arbitrary values as an example, no units or anything), and the robot is at a distance of 12, it will automatically move the robot to a distance of 10.

I have included functionality for using both the target area value that limelight directly sends back, as well using distance values, which can be easily calculated (more info on the readme of the repo, and here).

I hope this is helpful for teams, and if you have any suggestions on how this can be improved, don’t hesitate to let me know :slight_smile:

https://github.com/FirebirdRobotics/LimelightClosestTarget

2 Likes

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