Quote Originally Posted by menta View Post
I have managed to use the button as interrupt form this source:
http://darreltaylor.com/DT_INTS-14/hello.html

Is it possible also to get another interrupt for the same button while it is pressed for 2 seconds for example ?
IF a timer interrupts every 1/10 second, and you want to look for a button being pressed for 2 seconds, then I'd suggest looking at the button during every interrupt and add 1 to a counter. If the counter hits 20, the button is pressed for 2 seconds. If the button is let up when the counter is below 20, then reset the counter to zero.
Simple enough...