Skip to content

MUI - one button - two different jumps (destination pages)? #2351

Answered by olikraus
ViacheslavK9 asked this question in Q&A
Discussion options

You must be logged in to vote

I have created and tested a MUI menu with only one button and Bounce2 lib: https://github.com/olikraus/u8g2/blob/master/sys/arduino/u8g2_page_buffer/MUIInput1BtnBounce2/MUIInput1BtnBounce2.ino

There was a little change required: Instead of Bounce2.pressed() function we must use the Bounce2.released() function.

But all in all it works nicely with only one button:

void handle_events(void) {
// 0 = not pushed, 1 = pushed
if ( selectBtn.released() ) {
if ( selectBtn.previousDuration() < 200 )
mui.sendSelect(); // short button press
else
mui.nextF…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@ViacheslavK9
Comment options

@olikraus
Comment options

@olikraus
Comment options

@olikraus
Comment options

Answer selected by ViacheslavK9
@ViacheslavK9
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants