Trouble with Getting DC Motor To Work

Are you using exactly the same transistor and resistor value? Please post the code you're using.

Steve