Switch Button Long Push

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Switch Button Long Push

#11 Post by papperone » 02 Aug 2018, 19:04

grovkillen wrote: 02 Aug 2018, 12:09 I think we're on the same page here. Only a quick add to the discussion. The upcoming GPIO handler will make stuff like this possible. 8-)
that's great news!!! :mrgreen:
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Switch Button Long Push

#12 Post by TD-er » 03 Aug 2018, 21:59

Just for completeness, a part of the discussion between Jimmy and I about this:
The idea is to read 1 single register to inspect all GPIO pins. Mask (AND) that with just the bits you want to check and compare with the last known value.
That's about 5 clock cycli, so can be done as often as possible.
When something has changed, it has to see what bit has changed (XOR) and process the change.
Such a change may result in an "event", which is now not more than add a job to the scheduler.
Then the plugin that should deal with the event can read the last change, the time high and the time low.
Also we have the actual pin state, because it is not cached

mpopkin
New user
Posts: 1
Joined: 29 Nov 2018, 09:16

Re: Switch Button Long Push

#13 Post by mpopkin » 29 Nov 2018, 09:23

hello, I'm making a switchboard with 4 channel mains relay module with 4 buttons. I want when one of the buttons long pressed to turn ON/OFF all 4 relays. anyway, Can I do this?
I love playing a digital piano

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Switch Button Long Push

#14 Post by enesbcs » 29 Nov 2018, 12:08

mpopkin wrote: 29 Nov 2018, 09:23 hello, I'm making a switchboard with 4 channel mains relay module with 4 buttons. I want when one of the buttons long pressed to turn ON/OFF all 4 relays. anyway, Can I do this?
I've done it with this plugin:
https://github.com/enesbcs/ESPEasyPlugi ... button.ino
Using "butonname#Longpress" event on all four buttons.

mattie47
New user
Posts: 1
Joined: 18 Jun 2019, 12:02

Re: Switch Button Long Push

#15 Post by mattie47 » 18 Jun 2019, 12:05

enesbcs wrote: 29 Nov 2018, 12:08
mpopkin wrote: 29 Nov 2018, 09:23 hello, I'm making a switchboard with 4 channel mains relay module with 4 buttons. I want when one of the buttons long pressed to turn ON/OFF all 4 relays. anyway, Can I do this?
I've done it with this plugin:
https://github.com/enesbcs/ESPEasyPlugi ... button.ino
Using "butonname#Longpress" event on all four buttons.

Just wanted to say thanks for this. I've been using the plugin for ~ 6 months now :-)

I also wrote a blog post about how to use it as well :-)

https://techlife.nz/blog/create-an-esp8 ... g-espeasy/

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: Switch Button Long Push

#16 Post by enesbcs » 18 Jun 2019, 17:51

mattie47 wrote: 18 Jun 2019, 12:05 Just wanted to say thanks for this. I've been using the plugin for ~ 6 months now :-)

I also wrote a blog post about how to use it as well :-)

https://techlife.nz/blog/create-an-esp8 ... g-espeasy/
Thanks for mentioning. :) In fact, the new P001_Switch plugin in ESPEasy also capable of sensing longpress and doubleclick events.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 103 guests