# Having issues with a robot not able to turn

Hi there, we’re having issues with a robot spinning when we ask it to turn, I’m attaching our functions to this as well as the auton section from their competition code.

Any ideas?
``` motor_group LeftSide(leftFront,leftBack); motor_group RightSide(rightFront, rightBack); motor_group StrafeL(leftFront,rightBack); motor_group StrafeR(rightFront,leftBack); inertial Inertial17 = inertial(PORT17); smartdrive robotDrive(LeftSide, RightSide, Inertial17, 12.56, 15, 5, distanceUnits::in);```

``` void drivingF(int distance, int speed,directionType direction){ robotDrive.driveFor(direction,distance, distanceUnits::in, speed, velocityUnits::pct); } void slideL (int distance, int speed){ //Strafe left and right StrafeL.rotateFor(-distance, rotationUnits::deg,speed, velocityUnits::pct, false); StrafeR.rotateFor(distance, rotationUnits::deg,speed, velocityUnits::pct); } ```

```void turningT(int degrees, int speed){ //- means left + means right robotDrive.turnFor(degrees, rotationUnits::deg, speed,velocityUnits::pct); } ```

``` void autonomous(void) { drivingF(20,100,fwd); slideL(300,100); turningT(-90,100); ```

driving forward and strafeing work fine, just turns are not working and we’re not sure why.

Attaching a video

It should be turning counter clockwise (due to -90) so I guess motors are not setup correctly

8 Likes

Probably the wheels. I know our HS team said we had our wheels swapped, but thought we could make it work.

Thanks that makes a lot of sense now.

Which physical wheels you have on your robot will not affect the direction it turns. Which wheel (FR, BL, etc.) each motor is set up as will.

2 Likes

Thanks everyone for your help, appreciate it