So we are building the V5 ClawBot but we can’t lift the arm up or down.
First, we changed the port where the motor is connected to, in case it would help- and it did. We were able to move it up to 700 degrees/600 degrees or something (I’m not sure) which is probably it’s limit. So after that, I tried adding in another motion command: Spin ArmMotor down for 90 degrees. the moment I saved it and ran it on the robot, it moved a very very teeny tiny bit and didn’t budge.
So I thought that things started to go bonkers when that command was added, so I took it out. Even after i took it out, the first command (spin ArmMotor up) didn’t work and got stuck after moving a teeny tiny bit the same way that happened after that second command was added. HELPPPPP.
The spinning down was added and it got stuck after moving for a mil:
This code should work fine. Maybe try making the stop parameter true? Also, 90 degrees is 1/4 of a rotation so maybe it is working but not as intended?
Spin commands are “blocking” commands by default, so it will run them in order.
If it seems like the behavior is that it’s not ever executing the 90 degree turn, this could be attributed to it never reaching the 700 degree movement. Meaning, if the motor never reaches 700 degrees, it’ll never move onto the next block.
You can overcome this by using a timeout command. This will allow a blocking command to end when the target has been reached OR if the timeout is reached. In this example, the forward 700 degrees command will end when the motor reaches 700 degrees OR 10 seconds have passed since the beginning of the movement.