Button short or long press
cazzillopo
Posts: 2
Hi, I have a button on pin 0 that need to have the following behavior: When short press (0,2 second) it must set out 8 high
When long press (1 or more second) it must set out 9 high
I can not solve this problem
Someone have a solution ?
Thank You very mutch.
When long press (1 or more second) it must set out 9 high
I can not solve this problem
Someone have a solution ?
Thank You very mutch.
Comments
The value in btimer will tell you how long the button was held -- you can dictate what logic to apply from there. Note that this subroutine blocks the program until the button is pressed.
http://www.digikey.com/Web%20Export/Supplier%20Content/Parallax_149/PDF/Parallax_AppliedSensorsGuide.pdf?redirected=1
I'll try to inplement your suggestion in my project.