Intentional delays in autonomous mode

Generally speaking, is there a rule of thumb to add wait() blocks in the autonomous mode?

I find that if I don’t add wait commands to separate motor commands that I get an error that says something to the affect of: code exceeds the 3 second timeout… not sure what the exact error was but it wouldn’t download.

I do Vex EDR and I’m not sure how different vex IQ auton is different, but a general rule is to give time for the drive to settle and/or slow things down to make things consistent while also being within the time limit. Use all the time you are given for auton.

1 Like

Yes, you want to allow the motors to complete their task otherwise the program will zip right through and you would not notice any movement (or it will behave erratically).

It’s always best practice to put a wait command of some type (time based or encoder based) after giving movement commands to a motor so it can complete the tasks before moving on. Otherwise, the cpu will just process the next command in your code immediately and you will get erratic results or it may seem like the robot isn’t moving or going in the right direction.

Now, it’s totally possible that you intend to have multiple motors execute tasks at the same time, of which you would probably put a wait command after the last motor command. Such as issuing move commands to the right and left motors individually, then a wait command after the left motor command.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.