Skip to content

Use with rotary encoder? (just UP DOWN and ENTER) #137

Answered by Amha-Endrayes
rykener asked this question in Q&A
Discussion options

You must be logged in to vote

Yes.
This is what I did to get mine setup.
I used this encoder library called SimpleRotary and changed the following in the menu navigation code:
(the example below is based on the callbacks example included in the library)


/*
 Menu Item Callbacks

 https://lcdmenu.forntoh.dev/examples/command-and-toggle

*/

#include <ItemSubMenu.h>
#include <ItemToggle.h>
#include <LcdMenu.h>
#include <SimpleRotary.h> 

#define LCD_ROWS 2
#define LCD_COLS 16

//============================================
// Encoder Connection:
//============================================
// Pin A0 (DT), Pin A1(CLK) and Button Pin A2(SW):
// SimpleRotary menuEncoder(DT, CLK, SW);

SimpleRotary menuEncoder(A0, A1, A2)…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by forntoh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants