Answer to Vexdudes post

First you need to find out the exact circumference of the wheels you are using.

Use the formula 2 x Pi x R to calculate this.

Once you have the circumference you need to find out how many times the wheel rotates in 5.9m or whatever the distance you want to go is.

If you circumference is 1 meter than your wheel will rotate 5.9 times.

Once you have that you multiply that by 90 ticks which is one revolution on the encoder.

That will give you the total number of ticks you have to go to reach 5.9m.

Now take the number of ticks and plug it into your program.

Start motors
Drive forward
If ticks > = whatever you set it to
Then stop motors

If you want to make it have four programmed distances you can put the two bumper sensors and limit switches on it and when you push each button it will execute a differnt bracket of code.

You can also make it so that when you push a combination of buttons such as both limit switches it will execute a differnt bracket of code.

Having four buttons means that you can have 10,000 pre programmed distances lol!

I don’t think you need that many.

You may also be able to make it so that when you push a button once it adds .1 meters but i am not sure how to do this.

I hoped this helped, if it didn’t please tell me.