Do you use command based or iterative? Do you have any sensors (Specifically encoders)?
An additional note: The code you have right now will not work because you’re not waiting after you drive every time, autoCount will increment by one every time it runs which is about 0.05 secs so after 0.20/0.25 something like that the robot will stop, if you choose to use this code remember to add some kind of delay like Timer.delay(1) which will wait 1 second before continuing…
Plus, it’s a bad habit to use a while loop in a periodic method. remove the while loop because the periodic method will be called… well… periodically (again, once every 0.05 secs).