internal pull up r's

Try using:
pinMode(n, INPUT_PULLUP);

What version of the IDE is that?