Two Button detect for long press same time


+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2005
    Location
    The Netherlands
    Posts
    40

    Default Two Button detect for long press same time

    Hi all,

    I have on a panel two capacitive buttons, Fan (three steps) and Light control (three steps)

    Short press -> Fan step_1, press -> Step_2 press -> Step_3. Same with te Light button.

    But, I try to make a config setting with these two buttons.

    If hold the two buttons on the same time for 5 sec down, jump to the menu.

    Any advice for this? making for each button a LoopTime to detect long or short press?

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,632


    Did you find this post helpful? Yes | No

    Default Re: Two Button detect for long press same time

    what have you tried ?
    what chip are you using? can you provide a schematic


    https://www.picbasic.co.uk/forum/sho...th-Pic16LF722A
    Warning I'm not a teacher

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Two Button detect for long press same time

    so, I have made a exhaust fan timer with 1 mom button that will.... depending on press duration do..
    ----- >50ms and < 2seconds..... run fan for the programmed time of 15, 30, 60 or 120 minutes
    ---- continued press of >2 sec and < 5 sec times the fan for an 8 hour period then turns off
    ---- continued press of >5sec and held here until let go enters the programming mode for 30 seconds where the button is pressed once or twice or 3X or 4X to set the base run time for normal operation.... In any modes while running, a switch press turns cycle to off
    *** I did it with for/next's and if's and repetitive small pauses for the timing
    *** For2 buttons, I would work the first button pressed to completion then go on to continue on to checking for other or next sw press check

Similar Threads

  1. Long / short press button...but reading ADC
    By fratello in forum mel PIC BASIC Pro
    Replies: 37
    Last Post: - 10th July 2016, 08:37
  2. Replies: 5
    Last Post: - 26th February 2011, 05:51
  3. Button press or not
    By lerameur in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 24th November 2010, 20:37
  4. 4 Bytes one button press
    By Dennis in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 15th January 2010, 22:36
  5. Button press and press & hold how to ?
    By GrandPa in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 22nd August 2007, 03:37

Members who have read this thread : 7

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts