In RobotC it was easy to add a holding current to grip game objects when no buttons were pressed. Does anyone have example code showing how this is done in vexCode V5?
I believe you want motor.stop(brakeType::hold)
Dosen’t motor.stop(brakeType::hold)
just hold the motor’s last position? I would like to keep a low value of torque comming from the motor to lightly grip the game object.
1 Like
Ohh, sorry misunderstood the problem. I don’t know if there is an easier way to do this besides setting the motor speed to 5.
Use voltage instead, so it won’t apply any internal PID but just a mere voltage value towards the motors:
LBDrive.spin( fwd, 10.0, voltageUnits::volt );
BTW, voltageunits are from -12.0 to 12.0, where 0 is the resting position. They are a double value.
12.0 is full speed forward, -12.0 is full speed reverse.
3 Likes
Thanks! I’ll give it a try.