pinMode(fan1, INPUT_PULLUP);
tyred that but got, was not declared at this scope, im using arduino 1.0