Hi guys! I’m new to vex this year and I’m unfamiliar to VEXcode. I know some of the basics but not exactly what everything does. Currently, I’m using this code to tile my cube tray:
cubeTilt.spin(vex::directionType::fwd, 0.5, vex::velocityUnits::pct);
however, it keeps accelerating as I continue to hold the button, so I’ve had to dial it down to 0.5 percent to manage it. Does anyone know a way to make the motors just spin at a constant velocity?
you can always use rpm instead of pct. This should* keep the motor at that set rpm. your code is practically identical to the code for my intakes so I’m not sure whats wrong here.
I know what the problem is
the velocity makes it increace by .5
if u have this code it should work just fine:
Drivetrain.drive(fwd, (Controller1.Axis3.value() + Controller1.Axis3.value())/2, velocityUnits::pct);
The problem was a broken motor encoder. The motor couldn’t tell how fast it was going and automatically went from whatever speed we told it to 100%. Fixed by replacing the motor. Thanks, all!