AnalogButtonAdapter
-
class AnalogButtonAdapter : public InputInterface
- #include <AnalogButtonAdapter.h>
Adapter class to handle analog button array as input for an LCD menu.
Wiring example https://www.instructables.com/How-to-Multiple-Buttons-on-1-Analog-Pin-Arduino-Tu/
This class implements the InputInterface to provide button input handling for an LCD menu. It observes analog button presses and processes commands accordingly. Made for LCD 1602 LCD Keypad Shield
It initializes the button and observes its state to trigger menu commands when the button is pressed.
- Param menu:
Pointer to the LcdMenu object that this adapter will interact with.
- Param pinNumber:
is analog pin where is connected the array of buttons
- Param triggerValue:
Value of input pin, when button press is registered
- Param margin:
How much input value can change to be still valid button press
- Param command:
The command byte that will be sent to the menu when the button is pressed.