Line Follower Program Help

Hey all,

I’ve been trying to program our practice bot to follow the lines on the ground of the playing field. I’ve been looking at the sample code that LabVIEW supplies, but i can’t quite understand how it integrates with the drive system and how I can program it to work. There are a few resources on how to program the line follower, but no clear directions.

Does anyone have a code that works and can be modified, or advice?



I believe that the sample code is run in autonomous so make sure that you are set to autonmous when using it

You should also check out this document by National Instruments. It explains the line following algorithm used.

Haha… thanks… that was a fail on my part :yikes:

Is there anyway i can make the motors go slower during the autonomous program?

There’s a control named “StraightPower” on the Autonomous Independent vi’s front panel. It’s an array of values, one for each second of autonomous, used when the sensors say the robot should drive straight. Change them to be what you want, then right-click and choose “Data Operations -> Make Current Value Default” to make them stick. Depending on your drivebase configuration, you should probably also change the “Y Power” array, which is used when turning.

I found the NI tutorial, but I must be blind; I can’t find the sample code. Where is it located or what is it called? Yes, I installed the 2011 version of labview and the first update.

Nevermind. I was looking for it in examples, not in the default robot code itself.