Added multi-button information.

This commit is contained in:
Blaž Kristan 2021-07-27 07:00:23 +02:00
parent 3ef4c38a12
commit 54bd711172
1 changed files with 17 additions and 0 deletions

View File

@ -23,6 +23,23 @@ The "FX=~" macro steps through the effects (in this case short press).
The default (built-in) actions are short-press: toggle on/off and long-press: select random color.
## Buttons
Multiple buttons are implemented since 0.13 and allow a few different types of _buttons_ to be connected to the ESP:
- _momentary push-buttons_ that short GPIO pin to ground
- _momentary push-buttons_ that short GPIO pin to +3.3V (inverted)
- _switches_ (be careful with selection of GPIO for switch since some GPIOs will prevent successful boot of ESP if held LOW or HIGH at boot)
- _PIR switch_ AKA motion detection sensor (they set GPIO HIGH when motion is detected, this type of buttons will also trigger MQTT message with /motion topic)
- some GPIO pins on ESP32 can act as _momentary touch buttons_ with no additional hardware
- analog "buttons" (also with inverted logic) those can be used as potentiometers or analog input buttons
Button GPIO pin and type can be selected in _LED Settings_ page.
Each momentary button can have 3 different [Presets](https://github.com/Aircoookie/WLED/wiki/Presets) assigned, for short press, long press or double press. For switch type buttons you can assign only 2 presets, one for transition of switch from LOW to HIGH and second for the opposite transition from HIGH to LOW.
Selecting 0 for preset will set _default_ action. If you find that default action is _inverted_ for switch, please create presets for On and Off actions and assign them appropriately.
For assigning [Presets](https://github.com/Aircoookie/WLED/wiki/Presets) to buttons use _Time & Macros_ settings page.
### Analog button
Starting in WLED 0.13, analog "buttons" (e.g. a potentiometer) are supported.
Set the `Double` column in Button Actions to one of these values to configure: