Code problems with transistor

const int fanPin = 1;

Pin 1 is one of the hardware serial port pins.