How to change the gear ratio in vexcode v5

currently, our code is

vex::motor EL = vex::motor( vex::PORT16);

how would we change the gear ratio to increase torque?

thanks : D

You can’t increase your torque with code, sorry. You can either use a higher gear ratio, or use a slower motor cartridge.

If you mean setting the gear cartridge (which I think you do since increasing physical gear ratios with code, as @Xenon27 said, is quite impossible), you can add vex::gearsetting::ratio18_1 for the green cartridge, or 36_1 for red, and 6_1 for blue

1 Like

but you actually have to put the cartridge into your motor.

1 Like

Wait, why would you change the code when you change the motor cartridge?

Not sure, it’s just there so I use it. I don’t think there’s anything problematic if you don’t, but @jpearman would know if there is a reason to specify the cartridge.

it’s depends on how you control the motor.
If you ask the motor to run in percentage, then it probably doesn’t matter. but if you ask for a specific speed in rpm, then the motor actual output rpm would be incorrect if the software doesn’t understand which cartridge is installed. Same thing for rotating a certain number of degrees, we have to scale the internal raw encoder counts so the output of the motor moves correctly.

1 Like