Robot Won't Do Other Part Of Autonomous

My robot runs the program on one side, but when I take it to the other side, the rest of the program won’t run. Please help!

POST YOUR CODE!!! :slight_smile:

What I am curious about is what part of your program is stopping / starting the code.

4 Likes

@sankeydd
PROJECT_KANGO_2_7.iqblocks (59.5 KB)

Try to use wait blocks, make the time 2 seconds. I think that is the solution. If not then idk.

2 Likes

Sorry, I didn’t have a computer at home I could use to help. But, I can look at it here.

In general, for blocks you can just post a screenshot so we don’t have to open up another program to help. You can also easily export a pdf from code blocks.

You also have a LOT of code here, so it’s tough to know exactly where it’s getting caught up.

You keep changing the “timeout” command for your arm. I’m not sure why you’re doing that. That’s a “set it and forget it” type of command. You shouldn’t use it as a planned way to overcome a problem.

In general your flow is good. You have it wait for “led” to be pressed sometimes and sometimes it’s “led2”… Maybe you could have the light turn on for it when it’s waiting.

image

Also I don’t think it will do you much good to recalibrate the gyro in the middle of the program. You are going to burn up those 60 seconds pretty quickly. Reset the gyro at the beginning of the program and then let it be.

Finally, I would write a function for your arm movements.

image

This will cut the length of your thread by half and make it much easier to read. This sets the velocity, degrees (make it (-) for down) and if it is blocking all in one line. By making your code easier to read, it will make it a lot easier for you to troubleshoot your problems.

And happy holidays!

5 Likes

Thanks, it does the other part of the program now.