Answers.Body: <p>The command that you are looking for is setMotorTarget as shown in the documentation <a href="http://help.robotc.net/WebHelpMindstorms/index.htm#Topics/Function_Library_-_LEGO_EV3/Motors_-_EV3.htm" rel="nofollow">here</a>. </p>
  
  <p>Essentially, you need to set the target rotation for the motor in degrees and then wait for the movement to take place:</p>
  
  <pre><code>//Sets motorA target to 50 degrees at a speed of 100
  setMotorTarget(motorA, 50, 100);
  // Waits for movement to complete
  waitUntilMotorStop(motorA);
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-14T03:58:15.383Z
Answers.LastActivityDate: 2015-04-14T03:58:15.383Z
Answers.UserDisplayName: jncraton
Body: <p>I'm trying to rotate the motor of an EV3 by an angle of 50&deg;. I can't.
  How I can rotate a NXT/EV3 motor by a given angle using RobotC?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-17T11:51:23.673Z
Comments.Text: Is this a duplicate of your [previous question](http://bricks.stackexchange.com/q/6009/56) - or have you switched from NXC to RobotC? Are you using the interactive servo motors or the medium/large servo motors?
Comments.UserDisplayName: Zhaph - Ben Duguid
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-17T11:54:15.863Z
Comments.Text: Also - can you post an example of what you have tried - RobotC should support sending [specific angles to servos](http://www.robotc.net/forums/viewtopic.php?p=5764&sid=ca6339af082e78c7d4c4d3b856e76c71#p5764) assuming you've configured them correctly...
Comments.UserDisplayName: Zhaph - Ben Duguid
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-17T12:16:06.683Z
Comments.Text: You can also look at [LeJOS](http://www.lejos.org) - its API for sure allows a motor to turn a specific amount of degrees through the rotate() method. On an instance of a regulated motor this should give you a very accurate rotation.
Comments.UserDisplayName: Phil B.
Tags: <ev3><programming><motor><robotc>
Title: How can I rotate an EV3 motor an exact number of degrees using RobotC?
UserDisplayName: FDuarte
ThreadText: # How can I rotate an EV3 motor an exact number of degrees using RobotC?
  
  (Asked by: username_0 on 2015-03-16)
  
  I'm trying to rotate the motor of an EV3 by an angle of 50°. I can't.
  How I can rotate a NXT/EV3 motor by a given angle using RobotC?
  
  **Tags:** ev3, programming, motor, robotc
  > **Comments:**
  > **username_1**: Is this a duplicate of your [previous question](http://bricks.stackexchange.com/q/6009/56) - or have you switched from NXC to RobotC? Are you using the interactive servo motors or the medium/large servo motors?  
  > **username_1**: Also - can you post an example of what you have tried - RobotC should support sending [specific angles to servos](http://www.robotc.net/forums/viewtopic.php?p=5764&sid=ca6339af082e78c7d4c4d3b856e76c71#p5764) assuming you've configured them correctly...  
  > **username_2**: You can also look at [LeJOS](http://www.lejos.org) - its API for sure allows a motor to turn a specific amount of degrees through the rotate() method. On an instance of a regulated motor this should give you a very accurate rotation.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2015-04-14. Score: 3
  
  The command that you are looking for is setMotorTarget as shown in the documentation here. 
  Essentially, you need to set the target rotation for the motor in degrees and then wait for the movement to take place:
  //Sets motorA target to 50 degrees at a speed of 100
  setMotorTarget(motorA, 50, 100);
  // Waits for movement to complete
  waitUntilMotorStop(motorA);
  
  
  ---
  
  