02-13-2019, 11:14 AM
(02-13-2019, 02:36 AM)derekr Wrote: A crude way of doing it is to do your code equivalent of the following:
when button pressed (pin goes low or high)
delay 1 second (or whatever you deem suitable)
if, after delay period, button still held down (low or high) then that’s a long press
if not, it’s a short press
Only disadvantage is you always go through the delay period.
Hi derekr
Thanks for your suggestion.
Perhaps I should have mentioned that I have no idea where to start with coding! Is there a useful guide that anyone could suggest I look at to start to learn this process?
I think your idea would be good, but the system is for various people to use who will not be as understanding as you or I might be, and a delay would lead to confusion and double presses.
Many thanks