Basic interrupt question

I want to use an interrupt in a current project. I have declared the interrupt function and set the condition to LOW.

The switch will be a ground signal to the pin. Do I need to set the pin state as high in the setup loop, or does the hardware automatically use the pullup resistor. I'm worried about false triggers in the pin is left open.

Do I need to set the pin state as high

It is an input pin so you either need an external pull up resistor or you need to enable the internal pull ups by writing high to it AFTER you have set it to be an input.

Thanks Grumpy Mike

With a simple switch you'll also have to debounce either externally or in software.

I didn't think about the debounce. I believe I've seen code to add it into the firmware.

Thanks Bill.