Menu for Display

Hi

  1. Ok button
    Almost correct, except that you need to use the correct function prototype (see element reference for M2_BUTTON on the wiki page) and probably you want to refer to a submenu. That means, that m2.setRoot() is missing
void viewdate(m2_el_fnarg_p fnarg){
v = RTC.get(DS1307_HR,true);
m2.setRoot(&<nameofsubmenu>)
}
M2_BUTTON(el_num_zero, "f4", " Ok", viewdate);
  1. External button
    Connect one end of the button to an arduino pin
    Connect the other end to ground (0V)
    A resistor is NOT needed.

  2. You need to assign the button with m2.setPin(, <arduino_pin_number>)
    see Google Code Archive - Long-term storage for Google Code Project Hosting.

  3. Adding a display.
    Please follow this tutorial: Google Code Archive - Long-term storage for Google Code Project Hosting.
    Note: The correct name for the graphics handler is "m2_gh_lc"!
    Also take care to use m2_SetLiquidCrystal() as shown in the tutorial!

Oliver