Spin for changing brake mode?

It seems like this command:


Always changes the brake ode for the motor to brake or hold… If you set it to coast ahead of time it’s not coast anymore when your’re done. Has anyone else noticed this?


Im confused on what your asking , but if you use the set ----- to brake type ------ block then you can select Coast, hold, brake.

But sankeydd said that for some reason it changed back when the command was used.

try puting that code in a forever statement

spinToPosition and spinFor (the underlying sdk functions) will always leave the motor in hold mode when the command completes, this is a function of the motor and there’s not much we can do in the SDK. you could probably add a stop command after to get the motor back into the required mode.


I’ll try that tomorrow. Thanks!

1 Like

Do you know if setMotortarget and moveMotortarget in RobotC also leave the motor in hold mode?


Not sure, it’s been a while since I looked at any ROBOTC source code. I think we had our own algorithm for moving motors in RC, but I may be wrong on that. Are you still using RC ?


Yes, my son’s team uses regular RobotC. My daughter’s uses RobotC graphical.

1 Like