Blue cartridge motor going really slow in driver control

For our rolling intake, we have it on a 600rpm blue motor. When running it using the brain, it goes really fast just how we want it to. I programmed it to a button in the controller using Vexcode V5 Text, at 100 percent velocity. However, it’s going painfully slow, nothing like how we ran it on the brain. How do we fix this

post the code to show how you programmed it, where did you set 100% velocity ?

5 Likes


i tried it without the variables too (directly putting 100

Looks like your code is not inside a while loop, which means it probably does nothing at all. I suspect you also assigned the motor to a button using graphical configuration, which would mean it’s probably being commanded at the default velocity of 50 rpm and is why it runs slowly.
scrap the graphical controller button assignment, move the usercontrol code inside a while loop. Also, it’s not a good idea being able to run the flywheel from full speed forwards to full speed backwards, don’t do that.

13 Likes

Something else you could do, is try

Flywheel.setVelocity(100, percent);
Etc…
This could work right after you set the variables. What I did for this (drivetrain, but it shows the idea) is to always have the motor spinning outside of the while loop, and constantly change the velocity inside the while loop.
YOU MUST HAVE A WHILE LOOP!!!
|503px;x211px;
|790px;x88px;

This isn’t the best, but it gets the point across. message me if you have any questions.

1 Like

I use a function for my driver control, so is it that EVERYTHING, including the variables, should have a while loop?

Also i dont really understand what these variables mean (floatJoystickScalar, floatPivotScalar, etc.
is it like :
int x = Controller1.buttonName.value() * ______?
i don’t get what the blank is

Don’t worry about my variables. Those are special things for my program and weird values. Start your forever loop AFTER the variable, and BEFORE you set the velocity

I also looked again, and you never set the velocity. The auto-set velocity is 50%, so it will be going half speed. Start spinning the motors before the while loop (Like shown above) then INSIDE of the while loop, change the velocity. So it would be

Flywheel.spin(forward);

while(true) {

if (Controller1.ButtonL1.pressing()) {
Flywheel.setVelocity(100, percent);
}
}