Log in

View Full Version : Autonomous Programming


Wicked
19-02-2010, 17:18
This is what we're trying to do:

Use the optical encoder, in place of a joystick, to control the motors, by setting the motors to perform different actions when the encoder gives back a certain reading.

How exactly would we go about doing this?

randalcr
11-03-2010, 14:05
When I was programming our autonomous I used the Delay and Feed block under the watchdog blocks and just passed the Error reference in between the bits of code I wanted to have execute. I'll try to post a example of this as soon as I can.

Alan Anderson
11-03-2010, 16:52
Use the encoder value as the input to a case statement. Name the cases as ranges like "0..2499" and "2500..6999", and set the motors appropriately in each case.

Either put the whole thing in a while loop, or use Autonomous Iterative which calls your code repeatedly.