I don’t know exactly but we had the same problem with our inertial sensor, all we had to do was instead of putting something like turn till
inertial_15 = 30 which more often then not it will over turn every time causing it to spin forever, to fix this we put spin motor till inertial_15 > 29
And inertial_15< 31. That way it will stop in time and wont over turn. It has been very accurate for me.
We are using the turnToRotation command which works perfectly on other robots programs. The question is why isn’t it working with the code I provided above?
I don’t know but our inertial sensor is separate from the drivetrain because every time I setup the drivetrain with the inertial sensor it didn’t work so I made it separate.
Well, in order to use the smartdrive commands, don’t you have to include the inertial sensor in the smartdrive declaration? I want to use the smartdrive commands.
Well, that’s actually not true, see my previous post. What you have done is have two “wrongs” making a “right”. The constructors for the smartdrive are as follows.
left motor or motor group is always first.
because your left and right motors are configured backwards, swapping the order you send to the smartdrive gives the illusion of fixing. but whatever works for you I guess…
Got it. I don’t have access to the bot right now, but I will switch my smartdrive declaration back to the way it was and then reverse my true/false statements on my motor declaration and see what happens.
Just revisited this and your solution worked. I think the problem was that this was a test auton program and we never tested the user controls. So, the drive was messed up but they didn’t know it. Glad to have solved the problem.