# 90 degrees spins too much but 5.5 is just right?

I’m coding my auton and I try to turn my robot 90 degrees but it spins wayy too much but when i put in 5.5 or something degrees, it turns 90 degrees. I think this is a problem in robot config but I really have no clue. (this is in c++ by the way)

Are you using the Drivetrain configuration? If so, try swapping your gear ratio numbers and see if it behaves differently.

Uhh what do you mean by Drivetrain Config? It’s my first year in robotics so…

When you configure devices in the panel on the left, there should be a part that says drivetrain. Click on that and adjust the settings to match your robot. My guess is that this is a problem with your gear ratio.

the gear ratio is (im pretty sure) mathematically correct but ill try different gear ratios.

It’s mostly that VexCode takes them into the drivetrain backwards of what it (more frequently) should be. Think of it as the gear tooth ratio rather than the rotation ratio. If you have 36 on the motor and 12 on a wheel, that’s a 3:1 numeric ratio, but is generally stated as a 1:3 ratio (input:output). VexCode wants it in the 3:1 format, and having it backwards causes lots of unexpected behaviors, most easily observed by overshooting turns by a LOT.

If 5.5 is perfectly 90 degrees you can work around this by setting 5.5 as a variable and using that to turn your angles

``````rightangle = 5.5
drivetrain.turn_for(LEFT,rightangle,DEGREES)
``````

Or if you want to have it turn a different angle just multiply the right angle by any number that would bring your turn angle to the desired amount
ex. 45 degrees

``````drivetrain.turn_for(LEFT,rightangle*.5,DEGREES)
``````

But optimally if you want to turn accurately, you should try turning to headings instead.