Autonomous help

Our team was trying to make an autonomous function that would turn until a certain degree was measured by the gyro then move forward. Our problem is that were not sure how to get it to work well. We have a code that does this, but only reads the gyro every 1-2 seconds which would let the destined range be passed when spinning. How would we go about doing this so that the gyro gets a reading every tenth of a second, but running motors so that spin occurs at the same time until a specified range is reached?

As I understand it, you want your sensor code and your motor code to be running at different frequencies (to check your sensors more often).
Have you tried using two while loops running in parallel? One of the nice things about labview is that you can run two loops at the same time. Just pass the angle variable into the motor loop. That way you can have the two loops running at different frequencies.

Yeah this is what we want to do. I’ll try it tomorrow once i get to robotics.

you could also try putting the gyro code in the “timed tasks” section, and set the timer to 100 so it runs ten times per second (or some other number)