How to cotrol fan with Arduino

Daz1712:
Have a look at this.

controlling a motor

Daz

That's not a good example for this case: although it uses a transistor, it uses it to switch the Arduino's 5V supply to the motor, which is not what OP needs with a 400mA motor.