I’m trying to program our robot in PROS, but when I try to set the motors gearing through the “set_gearing()” command (specifically set_gearing(E_GEARSET_MOTOR_36). We want to set the motor to a red 36:1 cartridge.
and what happens ? what does your code look like ?
In general, all questions related to PROS can be found by reading the documentation.
https://pros.cs.purdue.edu/v5/api/cpp/motors.html#set-gearing
5 Likes
this is the code i wrote:
pros::Motor Slap(9);
Slap.set_gearing(E_MOTOR_GEARSET_36);
PROS tells me that “identifier E_MOTOR_GEARSET_36 is undefined.”
All depends on what namespace the compiler thinks you are using. but this should work.
Slap.set_gearing(pros::E_MOTOR_GEARSET_36);
5 Likes
Thanks a lot! I didn’t think about adding the “pros::” before the E_MOTOR_GEARSET, which I think was the problem. The code works properly now.