Ohm's law

Hi

I want to control my DC Motors speed with a Potentiometer, and it all have to be controlled by my Roboduino Duemilanove. But i dont know witch resister i need?

I want to use these parts:

Roboduino Duemilanove

3 - 4.5 volt DC Motor

TIP-120 Transistor

1N4001 Diode

4k7 Potentiometer

And it all is powered by a 12 v power supply

And i know i need one resistor between the Transistor and a pin on the board.

But i dont know witch resistor.

Thanks

http://itp.nyu.edu/physcomp/Tutorials/HighCurrentLoads

Are you looking for something along these lines? Note that you won't be able to reverse the motor this way. For 2 directions you need an h bridge circuit:

http://itp.nyu.edu/physcomp/Labs/DCMotorControl

or

http://www.thebox.myzen.co.uk/Workshop/Motors_1.html