user1149: Using an Arduino and an L293D IC, can I control the number of rotations a DC motor makes? Or can I only control the direction and speed of the motor?
I purchased a two-wheeled robot platform to learn Arduino programming and electronics. The platform is here: http://www.robotshop.com/en/dfrobot-2wd-mobile-platform-arduino.html
Each wheel is controlled by a DC motor. I followed Adafruit's tutorial (https://learn.adafruit.com/adafruit-arduino-lesson-15-dc-motor-reversing) to control the motors with the help of an L293D IC.
Now I realize that I can't directly control the rotations of the motor. I can control the direction, voltage, and time of the rotation. For example: turn forward at 50% voltage for 500 milliseconds. 
But that's difficult to translate into actual rotations. The speed of the motor varies according to voltage (like if I switch from 2AA batteries to 4AA's) and weight (adding sensors slows the motors down). Every time I change voltage or weight, I have to guess how much voltage/time causes a single rotation.
I think I should just buy stepper motors. Before I do that, I'll ask the community: Is there a way to control DC motors by rotations rather than time?

user40: As you've discovered, there are a lot of variables involved, so you need some sort of feedback.  A popular way to do this is with an encoder, but depending on your needs, other kinds of sensors can make do.  For example, if your problem is keeping the robot going in a straight line, an electronic compass can help.  For a line following robot, the line sensors are usually enough.  Range sensors can track your distance.  You get the idea.

user973: Stepper would be heavy and battery consuming, as Ignacio says.
Pololu makes an encoder for a wheel: http://www.pololu.com/product/1217, but obviously you can implement this in other ways too.  

1149: <p>Using an Arduino and an L293D IC, can I control the number of rotations a DC motor makes? Or can I only control the direction and speed of the motor?</p>

<p>I purchased a two-wheeled robot platform to learn Arduino programming and electronics. The platform is here: <a href="http://www.robotshop.com/en/dfrobot-2wd-mobile-platform-arduino.html">http://www.robotshop.com/en/dfrobot-2wd-mobile-platform-arduino.html</a></p>

<p>Each wheel is controlled by a DC motor. I followed Adafruit's tutorial (<a href="https://learn.adafruit.com/adafruit-arduino-lesson-15-dc-motor-reversing">https://learn.adafruit.com/adafruit-arduino-lesson-15-dc-motor-reversing</a>) to control the motors with the help of an L293D IC.</p>

<p>Now I realize that I can't directly control the rotations of the motor. I can control the direction, voltage, and time of the rotation. For example: turn forward at 50% voltage for 500 milliseconds. </p>

<p>But that's difficult to translate into actual rotations. The speed of the motor varies according to voltage (like if I switch from 2AA batteries to 4AA's) and weight (adding sensors slows the motors down). Every time I change voltage or weight, I have to guess how much voltage/time causes a single rotation.</p>

<p>I think I should just buy stepper motors. Before I do that, I'll ask the community: Is there a way to control DC motors by rotations rather than time?</p>
 40: <p>As you've discovered, there are a lot of variables involved, so you need <em>some</em> sort of feedback.  A popular way to do this is with an encoder, but depending on your needs, other kinds of sensors can make do.  For example, if your problem is keeping the robot going in a straight line, an electronic compass can help.  For a line following robot, the line sensors are usually enough.  Range sensors can track your distance.  You get the idea.</p>
 973: <p>Stepper would be heavy and battery consuming, as Ignacio says.</p>

<p>Pololu makes an encoder for a wheel: <a href="http://www.pololu.com/product/1217" rel="nofollow">http://www.pololu.com/product/1217</a>, but obviously you can implement this in other ways too.  </p>
