Autonomous coding not working completely

I’m doing my coding for Over Under, and I’ve gotten to the autonomous portion. The issue I’m having is that the coding won’t run my code to completion. It puts the catapult down low enough to go under the center bar, but it won’t move forwards. (The two pink blocks set the catapult down a bit, and the other spins the wheels motors forward.)


I would attach a video but it’s not letting me.

Can you show us the functions you are using? (the code for “move forward”)

2 Likes

That looks like you are telling your motors to spin then immediately stop. You need to set some parameters to tell it how long to spin for or put longer wait.
Also make sure to do the standard things and make sure the ports are set up and the motors are all plugged into the correct ones.

2 Likes

I changed the code a bit but it still doesn’t work.
I tried just putting in a move forward block, but it doesn’t move at all. I don’t understand why this isn’t working, as I did something almost exactly the same last year and it worked.

Are all of your motors connected to the right brain ports as they are set in the code? Do all of them have a solid red light? Do you have any gearing going on where the directions could be conflicting?

I checked all of those things, all good

Do you set their velocity to a non-zero number? If so, does the drive function reset it to zero?(it shouldn’t, but good to double check)

I added this if it’s what you meant. Still doesn’t work.

I also noticed that it’s picking up on the wait blocks for the exact amount of time, but it won’t read the motor blocks.

That code you posted won’t read anything past the forever loop, because it doesn’t break. Just put the insides of the loop at the top and try it

1 Like

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