Button (physically connected)

This module is used to describe the input button. This is about a Gpio configured as an input.

Int — not used yet
gpio PIN number for this input
pinMode — can be INPUT_PULLUP INPUT_PULLDOWN INPUT
debounceDelay — bounce processing time
execLevel — trigger level High or Low
fixState-input behavior, triggered at the transition or when the level is fixed (trigger mode)

To understand the dependence of the input behavior on the execLevel and fixState states, we present a table built after the fact:

Customizationat input 1input 0
execLevel 0High
fixState 0Low
execLevel 1High
fixState 0Low
execLevel 1High TM
fixState 1High TM
execLevel 0Low TM
fixState 1Low TM

Explanations to the table, High TM is a mode where 1 and 0 are fixed by a high level, but to change the state, you must first switch to a low level. The next high level will change state again. This mode is also sometimes referred to as high edge state switching.
Low TM is a low edge state switch.

Leave a Comment

Supported the project — saved a DIY maker! And we accept gifts...

X