Arduino Mega INPUT_PULLUP

I am using around 30 pins on a Mega as INPUT, to read some buttons. However, it's not reading properly over long wires. Would INPUT_PULLUP be more suited for this? Would the arduino have any problem using so many INPUT_PULLUPs at the same time?

Would INPUT_PULLUP be more suited for this?

Yes, if you are detecting a button press when the Input pin goes low.

Would the arduino have any problem using so many INPUT_PULLUPs at the same time?

No. It will be ok, unless you are also pulling a lot of power for something else off the 5V line. 30 times nearly nothing isn't much but could be the proverbial drop that causes the Barrel to Overflow.

The internal pullup resistors are 20K to 50K ohms, thus pretty weak. For longer wires a harder (less resistance) pullup is needed. If the internal pullups don't cut it add external pullups. Try 10K to start and if the switch data is unreliable, go to smaller resistors (minimum 1K). A 0.1uf cap across the switch can help to filter noise.

Would the arduino have any problem using so many INPUT_PULLUPs at the same time?

No. There can be no harm enabling all the internal pullup resistors. Like I stated, the resistance is pretty high so very little current flows.

petronel:
I am using around 30 pins on a Mega as INPUT, to read some buttons. However, it's not reading properly over long wires. Would INPUT_PULLUP be more suited for this?

You MUST have a pull-up or pull-down resistor to read a button so using the internal pull-up resistors (INPUT_PULLUP) would be 'more suited' than not using any pull-up or pull-down resistors.