Answers.Body: <p>This is actually a surprisingly difficult task. If you search for similar questions over on the Robotics stack exchange, you will find very smart people who can't even get it right with thousand-dollar localization solutions and graduate-level control theory.  </p>
  
  <p>If you have a Gyro sensor like Michael suggested, you're on the right track. You can probably get close to 16 degrees with that.  </p>
  
  <p>If you don't have a Gyro sensor, you can use the motors' built-in rotation sensors. If you drive the motors in opposite directions, the robot rotates around the point halfway between the wheels, and the formula is:<br>
  <a href="https://i.sstatic.net/7trjf.png" rel="noreferrer"><img src="https://i.sstatic.net/7trjf.png" alt="enter image description here"></a><br>
  Where:  </p>
  
  <ul>
  <li>r_wheel  is the radius of your robot's wheels</li>
  <li>theta_wheel  is the angle the wheel has to move</li>
  <li>r_robot  is the radius of the robot (half of the distance between the two wheels)</li>
  <li>theta_robot  is the angle you want the entire robot to turn, in this case 16 degrees.  </li>
  </ul>
  
  <p>So measure the radius of the wheel and the robot, plug in 16 degrees for theta_robot, and solve for theta_wheel. Then drive one motor forward theta_wheel degrees, and one motor backward theta_wheel degrees (simultaneously).  </p>
  
  <p>Bonus points if you make a MyBlock to have the EV3 do the calculation itself, for any desired theta_robot.  </p>
  
  <p>Actually even if you do have the gyro I would recommend trying both to see which gives better results for your specific situation.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-31T08:19:28.430Z
Answers.Text: I think the reason people struggle with this task is due to the difference between [maths and the real world](https://xkcd.com/669/) - you also need to take into account slippage of the wheels on the surface, play within the components, and so on ;)
Answers.UserDisplayName: Zhaph - Ben Duguid
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-01T01:52:51.580Z
Answers.Text: @Zhaph-BenDuguid Oh definitely. There's too many unknown variables affecting robot motion, and they add up to bigger and bigger error over time. Generally this task would be done using a Kalman filter, fusing the sensor readings from the motor encoders with an IMU and a compass. Such a task is totally doable with Mindstorms but is more than likely out of the scope of this question.
Answers.UserDisplayName: MindS1
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-30T18:59:53.570Z
Answers.LastActivityDate: 2018-11-01T01:53:41.830Z
Answers.LastEditDate: 2018-11-01T01:53:41.830Z
Answers.UserDisplayName: MindS1
Answers.Body: <p>Do you have a gyro sensor on your robot? I'm assuming you're using an EV3 set, and the Mindstorms programming environment.</p>
  
  <p>If so, reset your gyro sensor, and then insert a loop block attached to the gyro sensor. Set the loop settings to >= 16 degrees, and insert a tank move block into the loop. The motor should be set to 'on', with wheels going in opposite directions; the speeds should be relatively low to more accurately stop at your chosen degree setting. After the loop, be sure to insert a stop, or the robot will keep rotating.</p>
  
  <p>m.<a href="https://i.sstatic.net/JKtqX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/JKtqX.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-29T18:11:05.093Z
Answers.LastActivityDate: 2018-10-29T18:11:05.093Z
Answers.UserDisplayName: Michael Wendell
Body: <p>Does anyone know how to make an exact 16 degree turn with a LEGO robot?</p>
  
Tags: <programming><motor><robotic>
Title: How to make an exact 16 degree turn?
UserDisplayName: Cyrus
ThreadText: # How to make an exact 16 degree turn?
  
  (Asked by: username_0 on 2018-10-27)
  
  Does anyone know how to make an exact 16 degree turn with a LEGO robot?
  
  **Tags:** programming, motor, robotic
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-10-30. Score: 7
  
  This is actually a surprisingly difficult task. If you search for similar questions over on the Robotics stack exchange, you will find very smart people who can't even get it right with thousand-dollar localization solutions and graduate-level control theory.
  
  If you have a Gyro sensor like Michael suggested, you're on the right track. You can probably get close to 16 degrees with that.
  
  If you don't have a Gyro sensor, you can use the motors' built-in rotation sensors. If you drive the motors in opposite directions, the robot rotates around the point halfway between the wheels, and the formula is:  
  [![enter image description here](https://i.sstatic.net/7trjf.png)](https://i.sstatic.net/7trjf.png)  
  Where:
  
  * r\_wheel is the radius of your robot's wheels
  * theta\_wheel is the angle the wheel has to move
  * r\_robot is the radius of the robot (half of the distance between the two wheels)
  * theta\_robot is the angle you want the entire robot to turn, in this case 16 degrees.
  
  So measure the radius of the wheel and the robot, plug in 16 degrees for theta\_robot, and solve for theta\_wheel. Then drive one motor forward theta\_wheel degrees, and one motor backward theta\_wheel degrees (simultaneously).
  
  Bonus points if you make a MyBlock to have the EV3 do the calculation itself, for any desired theta\_robot.
  
  Actually even if you do have the gyro I would recommend trying both to see which gives better results for your specific situation.
  
  > **Comments:**
  > **username_2**: I think the reason people struggle with this task is due to the difference between [maths and the real world](https://xkcd.com/669/) - you also need to take into account slippage of the wheels on the surface, play within the components, and so on ;)  
  > **username_1**: @Zhaph-BenDuguid Oh definitely. There's too many unknown variables affecting robot motion, and they add up to bigger and bigger error over time. Generally this task would be done using a Kalman filter, fusing the sensor readings from the motor encoders with an IMU and a compass. Such a task is totally doable with Mindstorms but is more than likely out of the scope of this question.  
  
  ---
  
  ### Answer by username_3 on 2018-10-29. Score: 3
  
  Do you have a gyro sensor on your robot? I'm assuming you're using an EV3 set, and the Mindstorms programming environment.
  
  If so, reset your gyro sensor, and then insert a loop block attached to the gyro sensor. Set the loop settings to >= 16 degrees, and insert a tank move block into the loop. The motor should be set to 'on', with wheels going in opposite directions; the speeds should be relatively low to more accurately stop at your chosen degree setting. After the loop, be sure to insert a stop, or the robot will keep rotating.
  
  m.[![enter image description here](https://i.sstatic.net/JKtqX.png)](https://i.sstatic.net/JKtqX.png)
  
  
  ---
  
  