Coding for the v5 inertia sensor

Hello we are trying to utilize the new V5 inertia sensor. Does anyone have any example or sample code in which they utilize the sensor so that they can turn there robot in a manner that allows us to tell the robot to turn specific angles?

There is a large API for VEX that contains all of the functions needed.

3 Likes

Thank you we will look into it.

1 Like

I find the most useful part of the inertial sensor the heading. I use it like this for accurate turns:

while(inertial.heading >15) {
Drive.turn(left);
}

This is just pseudo code so keep that in mind.

2 Likes