my teams auton isnt working. i follwed a yt tutorial on how to make one and theirs worked fine. ours isn’t. All it does is drive forward ~3 inches and stops. it doesn’t do any of the other actions.
fld, bld… those are drive motors, the rest is pretty self-explanatory
If your code is the same as the tutorial, there is a good chance another setting or option is wrong without you noticing. Such the robot, the cables/ports on the robot may be in a different spot compared to the tutorial’s robot.
all the ports and all hardware is good, I’ve checked everything
Have you set a motor timeout? So the motor attempts to get to the right position for x time before giving up and continuing the code?
That’s caused my programs to freeze at the same point each time because a motor couldn’t rotate.
i have not, i reset the encoder values, what would be the line for that? we are all pretty new to auton programming.
That is a good question.
In VEXcode C+ it’s Motor.setTimeout(1, seconds);
, so hopefully it’s similar in Pros.
its the exact same! thank you, my last question is where would i put this in relation to my code (as seen above) would it be after or before the motor.rotateFor();
Happy to help!
It’s something that only needs to run once in your code to set it, so I’d put before any Motor.rotateFor();. You can refer to it later in the code if you want to change the timeout time throughout the program running.