LIS302DL accelerometer + digital pins interfering

Ok, I could really use some help with this from someone more experienced than I. I am relatively new to this so bear with me...

I have a LIS302DL hooked up my Arduino Pro 328. I can talk to it using i2c, and using Serial I can read back the xyz values. No problems.

When I then attempt to add a simple button to one of the digital pins, the Arduino will sometimes crash when the button is pressed. Even weirder, if I start up with the button pressed, depressing sometimes causes the arduino to crash. Sometimes things will work for a while, though often just one press/depress is enough to cause the crash.

I should note that I am using a homemade button - just a simple pair of foil plates and a 10Ohm resistor. I am using the internal 20K pull up resistor which can apparently be enabled by digitalWrite(pin, HIGH). On its own pressing the button works fine, only when using both the accelerometer and the button do things break. Even if I don't use any Serial output, or even read the digital pin which the button is connected to, the problem remains. Debouncing the button doesn't make a difference. Mimicking the action of the button by touching a resistor between the digi pin and ground pin on the Arduino directly also causes the same effect.

The one thing I can think of is that the accelerometer is connected by 10-way ribbon cable to the arduino board (at the moment only by a length of a few inches, but in the future possibly several feet). Is this arrangement likely to cause problems - particularly the one I'm having? And if so, what is the best cable/connector to link up the arduino and LIS302?

Any help would be much appreciated, thanks =)

I am using the internal 20K pull up resistor which can apparently be enabled by digitalRead(pin, HIGH

That would be "digitalWrite".

(at the moment only by a length of a few inches, but in the future possibly several feet

I2C is not rated for that sort of length of cable. It is meant for comms between devices on the same board.

Sounds like you may have an ESD problem - have you tried a proper switch?

After further tests, longer cables seem to exacerbate the problem. However, the I2C bus spec seems to suggest it should work for short (<10cm) cables - even with the smallest cable I can make, the board fails after a few presses. Would using some kind of twisted pair or shielded cable help?

Sounds like you may have an ESD problem - have you tried a proper switch?

Unfortunately I don't really have access to a proper switch. I tried using an ESD wrist band whilst working but it made no discernible difference as far as I could tell.

It could be decoupling or rather lack of it:
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

However it sounds like some sort of wiring problem where you are shorting the supply and taking the power down.

Any talk of ESD problems are rubbish.