Limelight program

I don’t know how to write limelight program in labview can somebody help me? I want to let my robot run with Reflective strip. please thank you!!

The official Limelight docs have everything you need.

1 Like

Someone can help you. It would help if you posted this question in the Programming category (specifically, LabView), though.

Two other questions:
-Have you used Limelight before?
-I assume that you’ve used Labview before, you just need to figure out how to use Limelight in your current codebase?

1 Like

no,I don’t have use before

I have searched before,but I can’t find anything

1 Like

I’m definitely not a programmer, but I was able to find the sample code for a very basic Limelight operation in about 47 seconds by looking at the linked documentation.

When you follow the link, you come out on a home page with navigation stuff to get around the site. Right in front of you is the “Getting Started” section. If you’ve already wired and mounted and otherwise initially started the camera, skip that to the “Basic Programming”, which will have a section with code in multiple languages. If you haven’t wired/mounted the camera, start with that.

After that, start digging through the rest of the documentation. You will need it, as that’s where the real work is.

1 Like

I have saw that before ,but I can’t understand.
And I dont know how to start it.

some specel code I can’t find in labview,do youu know how to find it?

Follow the link. When you get to the section titled “Basic Programming”, scroll past the tables to where you see a window marked “Java”. Next to that will be something saying “Labview”. Click that. Sample code is right there. Now, how to get to it in Labview, I’m completely out of my depth and can’t help you–but you might be able to copy and paste it?

If you’re having trouble with Labview in general, I suggest dropping by NI LabVIEW - Chief Delphi (and mods, if you could move this thread over there please?) and you’ll get more help.

Is it this?

That’s the sample code I saw, yes.

How to use it… that’s for the rest of the documentation.

How about other documentation.

Do you know how this code work

I’m not a programmer, and what limited programming I do have is in C++ or in Visual Basic (Excel macros and that sort of thing). So I don’t know how this particular code works.

What I do know is: The answers are either in the Limelight documentation, which is extensive, at the earlier link, or somewhere at FIRST Robotics Competition Control System — FIRST Robotics Competition documentation. I strongly suggest sitting down for a while and reading the documentation until something makes sense. You may need a couple of days to work through it.

1 Like

okok! thank you very much. your a good man

Moved to the Technical Programming folder.

1 Like

What do you want to do with the Limelight? This diagram is reading a few of the values from network tables and storing them in a cluster (I can explain clusters more if you want). This is probably not what you want to do. Most people just want tx (the Yaw rotation) and want to point the robot at something.

This diagram (the top half) is much more helpful in that regard. It is using P only PID with a minimum turn (to combat friction) to turn to the correct heading. You would wire SteerCommand directly into the rotation input of your arcade drive.

If you don’t understand what I am saying I suggest you post what you have tried and we can give advice from there!

I want to let my robot run to the Reflective strip in auto. this is my code.

I have test this code but it didn’t work. it work very Strange. it go backwards when he saw Reflective strip.

what is that main? Do you have any example or picture thank you.

Have you probed what ta value you are seeing from the limelight?

Does a positive value drive you forward? Keep in mind joysticks are inverted. You probably have your drive inversion wrong but it works because negative is forward with the joysticks.

To fix this the simplest way is just to invert the ta line going into arcade drive. The correct but more complicated way is to fix drive inversion then invert your joystick