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