pros controller not working

So i am doing the clawbot tutroil but after doing pros mu and running the code the robot does not move when I use the controller. can someone please help?

#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); // This reverses the motor
  pros::Controller master (CONTROLLER_MASTER);

  while (true) {
    left_wheels.move(master.get_analog(ANALOG_LEFT_Y));
    right_wheels.move(master.get_analog(ANALOG_RIGHT_Y));

    pros::delay(2);
  }
}

perhaps follow the advice already given to you in this topic.

2 Likes