Hey thanks for the reply. I'm using 10k. I had forgotten to set pin 2 as an input (is that what you mean by internal pullup resistor?) I hooked up a multimeter and its going from 0V to 4.78 like expected on the pin, but still working intermittently.
No, by pullup resistor I meant you would have code like:
digitalWrite(2, HIGH);
When pin 2 is an input, writing a HIGH to it enables the internal pullup resistor. So don't do this in your application.
Perhaps you can attach your whole code. It might be possible that you're getting switch bounce which makes it look like intermittent operation while really you're just getting a whole bunch of interrupts all happening at once (depending on how your code is written).
--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons