Inertial sensor question

Hello, I am coding an inertial sensor using v5 block code and I am wondering what the difference is between the turn to heading/rotation and the set to heading/rotation. I know the difference between the heading and rotation, just wondering what the difference is between the set to and turn to. Also is there a way to use the sensor to drive straight and not drift? I am trying to use it in auton skills to keep our robot from drifting when driving straight. Thanks in advance.

“Turn to” moves the robot until the heading/rotation is the specified value.

“Set” does not move the robot, it just sets the heading or rotation to the specified value. Most often this would be used to reset the heading/rotation to 0, but you could also reset it to some non-zero value.

3 Likes