Jomelo / LCDMenuLib2

Create a tree menu. Use it with different lcd types / console output / ssh console.
MIT License
249 stars 46 forks source link

does this menu support rotation encoder? #75

Closed youxiaojie closed 3 years ago

youxiaojie commented 3 years ago

does this menu support rotation encoder? I see it support 3 to 6 buttons, not mentioned encoder, so I ask here. thanx

Jomelo commented 3 years ago

Hello, yes it is possible. Open any example and navigate to the LCDML_control tab and read the comments:

Chose Option 3

// content: // (0) Control over serial interface with asdw_e_q // (1) Control over one analog input // (2) Control over 4 - 6 digital input pins (internal pullups enabled) // (3) Control over encoder [third party lib] (Download: https://github.com/PaulStoffregen/Encoder) // (4) Control with Keypad [third party lib] (Download: http://playground.arduino.cc/Main/KeypadTutorial ) // (5) Control with an IRMP remote [third party lib] (Download: https://github.com/ukw100/IRMP ) // (6) Control with a joystick // (7) Control over I2C PCF8574

Scroll down until you find the code (line 243) for option 3 and read the comments. Adapt your pins to the example and use it ,-)

You have to download the encoder lib from PaulStoffregen. You can find the link in the comments.