One way would be to increase your interrupt rate to once every 50 milliseconds. In your ISR, check for PORTB.0 to be low and increment a counter. If the counter reaches 200, before PORTB.0 goes low, then the button hasn't been pushed for 10 seconds.
One way would be to increase your interrupt rate to once every 50 milliseconds. In your ISR, check for PORTB.0 to be low and increment a counter. If the counter reaches 200, before PORTB.0 goes low, then the button hasn't been pushed for 10 seconds.
Charles Linquist
Bookmarks