neu-rah / ArduinoMenu

Arduino generic menu/interactivity system
GNU Lesser General Public License v2.1
929 stars 189 forks source link

Menu with analogue input buttons #401

Open gecko9 opened 1 year ago

gecko9 commented 1 year ago

Many thanks for this epic library. I have a project using an OLED display, and to save GPIO's, it also uses the ESP8266 (single) analogue input to resolve which of five buttons have been pressed. Is it possible to use the ug82 library menu with this analogue button arrangement? And if so please some hints on the required code. Apologies if this is not the right place to ask this kind of question.

neu-rah commented 1 year ago

Hi! there is an example using analog joystick

https://github.com/neu-rah/ArduinoMenu/blob/master/examples/ajoy/ajoy/ajoy.ino

but one thing about the lib is that it can be command driven, one doesn't need an input driver, simply issue comands that suit you custom input, here is the example:

https://github.com/neu-rah/ArduinoMenu/blob/master/examples/codeCtrl/codeCtrl/codeCtrl.ino

you're welcome