user33879: Can someone please give the code which can be used to rotate the dc motor a specific number of rotations like 2 rotations or 5 rotations. I'm using arduino uno board.

user2881: You can't. You either have to attach a sensor to the motor shaft to measure the numbers of rotations or use a stepper motor. 

33879: <p>Can someone please give the code which can be used to rotate the dc motor a specific number of rotations like 2 rotations or 5 rotations. I'm using arduino uno board.</p>
 2881: <p>You can't. You either have to attach a sensor to the motor shaft to measure the numbers of rotations or use a stepper motor. </p>
