Robot stuck after turning

Hello, I am a new coach and am following the treasure hunt STEM lab. I built a simple clawbot and program it with the following code block:
Screen Shot 2023-07-11 at 3.11.59 PM

My robot is often stuck after the Turn right for 180 degree block (no movement at all). But if I touch it once or twice, slightly move it a bit, then it resumes to the next step.

What can be the problem and how to fix it?

Thank you.

This probably means that your robot is unable to completely execute the Turn Right for 180 Degrees block. I would add a drivetrain timeout block at the beginning of your code, probably for something like 3 seconds. Timeout means that after a certain amount of time after the goal isn’t met, the robot will continue to the next block.

4 Likes

@Thanh_Do says that the error occurs after the turning block, so the issue wouldn’t be there.

I’m guessing you’re right. Thanks for correcting me!

3 Likes

Thank you all. Adding the drivetrain timeout block at the very beginning of the program fix the problem.

3 Likes

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