Go Down

Topic: MENWIZ: yet another character lcd menu wizard library (Read 78 times) previous topic - next topic

calim

I already tried to set up another the MAX_MENU-variable in the scetch instead of the MENWIZ.h. So it had no effect.  :smiley-roll-blue: Now when I change it to 25 it works (but I haven't set up half of the variables I want to change). When I set it to 30 there occur errors in the menu. I hope 25 is enough to set up all menus.
I need menus to set up time, 2x on-times for the light, 2x off-times for the light, moon-light duration, temperature and fan-offsets, CO2 on and off, 2x on and off for the dynamic pump, 2x time and duration for the fertilizer pumps as well as activation variables for some of the options. Seems to be some extensive menu making ahead.  :)

Thank you for the help!
~~User of the mighty Arduino Nano v3.0~~

brunialti

#171
Sep 04, 2012, 10:46 pm Last Edit: Sep 04, 2012, 11:18 pm by brunialti Reason: 1
MAX_MENU is not a variable, is a define. It take effect at compile time not at run time.
Which errors?
check free memory and use getErrorMessage  (it allert you when lib cannot allocate memory).

calim

Yes, I was sloppy when writing the last post.   :smiley-red:
When I'm back at my arduino I'll try to get the information about memory and errors. Yesterday I got the error when trying to adjust a integer variable (which was 0 to 180 in steps of 1). When I activated the menu I got huge negative values on the lcd as limits which change (to also huge random numbers) when I try to adjust the value before freezing. I think this is some kind of overflow.
Just a thought, would it be possible to make a recurring menu? I, for example, need 12 times a menu to set time. I could be memory saving to have just one menu to set time and call it from several points of the menu and to use it to set variables depending on the actual menu position. I haven't looked into your library and how you remember the position in the menu. It may well be incompatible with the library.

Thanks, calim
~~User of the mighty Arduino Nano v3.0~~

tomega3


I'm happy it works. It was in my goals to write a library simple to use and hackable.
And now let me try to hel paco :-)


p.s. please send to me the modified files and sketch. I want let it available on github


Hi, I will send you the modified libs, how do I send them to you? I am new to these message forums and not sure how to send them to you. The zipped files are to big to attach, about 9KB

Question
I have been testing your Test_all_var_types example and all is working well with the exception of getting the current value of the tp selection list. The menu remembers that I last selected list item 4 or 5, but when I try to print it to the serial monitor when the Write To serial  menu item is selected and confirmed, tp aways prints as 0, all the other non list variables like the float, byte, boolean, and int show the last selected value but not the list number selected.

Any ideas what I should do to see the currently selected List item number?

Thanks
Tom

calim

Quote

MAX_MENU is not a variable, is a define. It take effect at compile time not at run time.
Which errors?
check free memory and use getErrorMessage  (it allert you when lib cannot allocate memory).


I tested the scetch I was working on. With #define MAX_MENU 25 the menu works fine. With #define MAX_MENU 30 I get a error when I go into the last menu I created and try to set the variable. Instead of
Code: [Select]
0 [0] 180 there is
Code: [Select]
1190 [0] 3597 on the LCD and I get the error code 44. freeRam is 98. When I leave the menu the error code is gone (0), still with freeRam=98 and instead of the menu point to set the variable the point is changed to my root menu name. When I select it I get to the root menu.
Strangely, when I set another variable in another menu branch this works well. However, when I go to the last menu there is the entry of the root menu as described above.

I hope this helps and is not too confusing.

calim
~~User of the mighty Arduino Nano v3.0~~

Go Up