Inertial sensor problem turning

Hi im having a problem, im still new to vex pro but heres how i delclare my inertial sensor
inertial posSense(PORT15);

and heres how i declare my smart drive, whenever i try and turn with it it turns forever

smartdrive dt(leftsidedrive, rightsidedrive, posSense, 299.24, 320, 40, mm, 1);
drivng forward and that works
my only substitute for turning is a dumbdrive but its not efficeint enough so can i get help?

its probably something to do with how i declared my smartdrive, i dont know the parameters of it still so i had someone help me out with it

so basically you have to make sure the motor groups are in the correct place, i already wrote a bunch of code for “reversed” turning and i didnt really want to change it since i was short on time. but basically the inertial sensor would turn the robot forever since it was looking for a -90 but i wanted it to turn right 90 degrees so when it checks to make sure that it is facing 90 degrees it keeps turning and wont stop. so if anyone had a similar problem there you go :smiley: only too me until i lost at state to figure out

1 Like

What do you mean " you have to make sure the motor groups are in the correct place"?

Sonbasically while declaring your drive train you need to make sure the motor groups(your left drive motor and your right drive motors) are in the correct spot because i beleive it should be right drive motors first then left drive motors. idk off the top of my head but the decleration should look like this maybe
Drivetrain dt = dt(right motor drive, ledt motor drive, all thr other values); after im not busy ill access my code and give a more clear example with the correct code

THAT’S IT!!! Holy cow, that is frustrating. It works perfect now!

see this. sounds like you have the mistake.

4 Likes