Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request implements the possibility to connect a button to the microcontroller as an open/close button.
It is useful when the device is connected to a latching electromagnetic lock in which case the lock can't be circumvented - the magnet must be disabled to open the door - when someone wants to leave the room.
I can imagine another scenario for the usage of this button:
Given an office where we usually have lots of guests and this room is protected by ESP RFID.
To avoid walking to the door and opening it manually every time when someone knocks (without having RFID tag), we may place one or even more buttons near our workplaces to allow us to let the guests in without the need to walk to the door.
It utilizes the Bounce2 (https://github.com/thomasfredericks/Bounce2) library to properly debounce the button. The input is configured to use the internal pull-up resistor, therefore we consider the low state of the button as pressed.
Every time the button is pressed, a log entry is being created in the Access Log.