Go Down

Topic: Menu for Display (Read 17 times) previous topic - next topic

olikraus

Good to read that you had some success :-)

Oliver

gnusso

Thanks again :-), I'll let you know about the next steps :-)

gnusso

Ciao Oliver :-) how are you,
so now that I've take more confidence with your menu I'd like to do a menu that when I turn on arduino put into display :
          colums :   
           0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19
----------------------------------
1°row| Arduino Welcome
2°row|     Ver . 1.0
3°row|  06 - 02 - 2013
4°row|  10 : 23 :  55
----------------------------------

and then just when I press the first time select button appears the other menu, then will be exit to all menu will return to this screen,

is possible from your point of view ? could you give me suggest ?

thanks for the support,
have nice day,
gnux

olikraus

Sure, this is described in tutorial 6: http://code.google.com/p/m2tklib/wiki/t06u8g

- You start with an empty element: apply &m2_null_element as first element to M2tk. This will disable all menues.
- draw your personal intro screen (as described above), by using the normal LiquidCrystal commands.
- In the main "loop()" do the following:
Code: [Select]
  if ( m2.getRoot() == &m2_null_element ) {
      if ( m2.getKey() != M2_KEY_NONE )
        m2.setRoot(&el_my_own_top_menu);
  }

This will activate your menu once the user has pressed a key.
- A soon as the user has finished working with your menu, use
Code: [Select]
         m2.setRoot(&m2_null_element);

to disable your menu again. Of course you need to redraw your own screen again.
More details are given in tutorial 6

Oliver

gnusso

#79
Feb 07, 2013, 12:47 pm Last Edit: Feb 07, 2013, 12:59 pm by gnusso Reason: 1
Ciao Oliver,
thanks for the information,
I try and however I'll let you know :-) and for example if i would like put in display time is better to use "normal LiquidCrystal commands" also ? and when i re-draw my screen again I call procedure after  m2.setRoot(&m2_null_element); ? Is there a simply example that I can use for take confidence ?

so how do you will implement it ?

thanks 10000000 again :-),
gnnux

Go Up