Pros clawbot not working

ok so i am new to pros and to learn the basics i am trying the claw bot tutorial just to get used to it. I am trying to just get the robot to move but it wont do anything. can someone please show me why its not working. here is my user control code

std::int32_t pros::Controller::get_analog ( pros::controller_analog_e_t channel )

std::int32_t motor_move ( const std::int8_t voltage )
#define LEFT_WHEELS_PORT 3, 4
#define RIGHT_WHEELS_PORT -5, -6
void opcontrol() {

  pros::Motor left_wheels (LEFT_WHEELS_PORT);
  pros::Motor right_wheels (RIGHT_WHEELS_PORT);
  pros::Controller master (CONTROLLER_MASTER);

  while (true) {
    int power = master.get_analog(ANALOG_LEFT_Y);
    int turn = master.get_analog(ANALOG_RIGHT_X);
    int left = power + turn;
    int right = power - turn;
    left_wheels.move(left);
    right_wheels.move(right);

    pros::delay(2);
  }
}

Here are the problems Iā€™m spotting:

  1. I really hope those lines before the #define statements are not in your code. Remove them.
  2. if you want to use multiple motors, you need to use a pros::MotorGroup, not a pros::Motor. Read their docs here Motor Groups C++ API ā€” PROS for V5 3.8.0 documentation
  3. use a 10ms loop.
3 Likes