Fratello, fiest I would change the value of R4 to say... 100 Ohms. That way you are giving the port something less than 1/2 vcc to be seen as a low. Next I would on the trailing edge of the button press, start a loop counter and count some number of time the button is in the down state. When the button is released check the time against a constant of your choosing and see if it longer or shorter than that.
Bookmarks