Timeout 3 seconds for button

General discussion on mikroBasic PRO for PIC.
Post Reply
Author
Message
qbasic
Posts: 69
Joined: 21 Aug 2012 07:28
Location: Italy

Timeout 3 seconds for button

#1 Post by qbasic » 25 Aug 2020 20:59

I need to make a button that when pressed for 3 seconds executes a code
and instead, if pressed for less than 3 seconds executes a different code.
How you do it ?
Anyone know ?
Many thank at all
Good evening

Fab6657
Posts: 53
Joined: 20 Feb 2010 05:33
Location: East of France

Re: Timeout 3 seconds for button

#2 Post by Fab6657 » 26 Aug 2020 07:37

Hello,

have a look to my initial post, you need just to adapt the value of the endtimer to reach your 3 seconds time:

viewtopic.php?f=97&t=76921

Tell me if this work for you, in the meantime i have a small variant if you want to use this routine with more than one pushbutton.

You have also the other options proposed inside this post. Just try the best for you!

@++

Post Reply

Return to “mikroBasic PRO for PIC General”