Menu for Display

Hi

Instead of

M2tk m2(&list_element, m2_es_arduino, m2_eh_2bs, m2_gh_lc);

use

M2tk m2(&m2_null_element m2_es_arduino, m2_eh_2bs, m2_gh_lc);

to assign the null element at the beginning.

And then, the loop procedure MUST be expanded to this (see also the mentioned tutorial!!!)

void loop(void) {
 if ( m2.getRoot() == &m2_null_element ) {
      if ( m2.getKey() != M2_KEY_NONE )
        m2.setRoot(&list_element);
  }
  m2.checkKey();
  if ( m2.handleKey() ) {
    m2.draw();
  }
}

You must not forget to call checkKey(),

Oliver