My team has been having a problem regarding our program. Our program will execute the first command (Spin arm forward) But fail to execute all other commands after that. We have swapped our motors, made sure our brain works, swapped the battery, and swapped the command for other ones to ensure they work. We know that it is not a motor timeout problem. Can anyone offer any suggestions?
Have you checked that the ports are correctly assigned in the devices tab? It might be a good place to start. It also might be helpful to send any other code you have in the program.
You ask the arm motor to spin for 420 degrees, if the arm can not move that far the command will never finish unless you set a timeout. Try using smaller numbers until the code works.
As jpearman suggested… it sounds like your arm can not physically reach the position you are setting. A quick way to see if this is the problem is to click on the white triangle at the end of the spin block and toggle the command to “and don’t wait”. The code should then start to move the arm, but immediately execute the next line of code (without waiting for the arm to reach 420.
If that solves the problem, switch the toggle back and find the correct value as jpearman suggested.
I quick way to tell the degrees is to control the brain directly via touchscreen, go into the motor in question, carefully move the arm by hand, and note the degrees reading on the brain’s display.