V5 gear cartridges coding

When browsing around the Pros documentation page, I found an interesting set of code, concerning gear cartridges. The fact that the gear cartridges could be initialized, through a line of code. I was curious to know as to whether or not, it had to be done in order for a certain gear cartridge to work. Or if it was to simply help with coding. Furthermore, if it had to be included in the initialize.cpp project sector.

1 Like

In pros you can set the output RPM but for that you need to know the gear cartridge that is in the motor. This means that if you have a blue cartridge (600rpm) but in pros mark it as a green cartridge (200rpm) and tell the motor to spin at 200 rpm, which is max speed, it will spin at max speed which would actually be 600rpm.

2 Likes

So it basically makes it easier to code the robot.

Yes, but you really should set them to the right cartridge. Forgetting that you have it set wrong can cause trouble that would otherwise be very easy to avoid.

1 Like

But if I don’t set the cartridge which one is it by default?

or would it only work for ::PCT::

It’s green by default: 200 RPM.

2 Likes

I usually dont set their motor cartridge since most of my motors are the green highspeeed ones