Re: Programming for Arm Motors
Without seeing the rest of the code (with the task main() and everything else inside of it), I'm guessing the robot is hitting the end of the program. When this happens, ROBOTC automatically turns off all motors to prevent the robot from being uncontrollable.
To solve this, you will first need to stop any motors that you don't want moving (MotorDriveL and MotorDriveR, I'm guessing) by giving them a speed value of 0. After that, you can put what is known as an idle loop to keep the arm set a certain position:
This will stop the drive motors and apply the same servo positional values to the MotorArmL and MotorArmR motors until the program is ended manually.
Check out our Blog
! And our Facebook page
Need help? Take a look at our Wiki
and our Forums.I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe?
~ Carly Rae Jepsen parody