I have a problem where my Arduino is triggering an interrupt all by itself from start up. I've had the code working all the time up to just now and i cant figure out why this is.
I've disconnected all pins on the Arduino Mega and stripped the code down to the bare minimal but the interrupt still triggers constantly.
It can especially be noise because you disconnected all pins. The pin should be held one way or the other by a resistor. The inputs on an arduino are extremely high impedance and will wander up an down in the presence of any electrical signals in the vicinity. You can hold a pin high with the internal pull up resistors by writing the pin high after declaring it as an input as in this pulled out of a bit of my code :
pinMode(gasdigPin, INPUT);
digitalWrite(gasdigPin, HIGH); // internal pull up
You'll need an external resistor between Gnd and the pin to hold it low (10k is a reasonable value).
Actually disconnected pins will behave totally erratic. They may pickup noise. Or they may float slowly or they may do any other strange stuff, including things like increasing your power consumption for no obvious reasons.