Go Down

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


Aug 25, 2012, 09:19 pm Last Edit: Aug 25, 2012, 09:23 pm by brunialti Reason: 1
as far as I can see, you need to:
- include LCDI2Cw.h instead of LiquidCrystal.h both in MENWIZ.h and MENWIZ.cpp! ( or at least I cannot see that includes...).
- replace   "LCD*     lcd;"  declarations with "LCDI2Cw *lcd" in MENWIZ.h
- the write calls with print(s) in MENWIZ.cpp

please use # mark for code !


Thank you Bruno,

Sorry for not posting the code correctly, I will remember for next time.

The test sketch now compiles, I had to change a line in Menuwiz.cpp in the begin routine to say:
lcd=(LCDI2Cw*)1; rather than lcd=(LCD*)1;

I will test the code tonight and let you know how well it works.

Thanks again for your help.



Ok. Remember the patch, if you are using only 4 buttons:

The method addUsrNav allows only to replace the 6 buttons model, that is the actions performed are those expected by the 6 buttons model.
The next release of addUsrNav release will allows to explicitly set the replaced model (4 or 6 buttons mode).
With release 1.0.1 if you want to use addUsrNav you can patch with the following lines in the sketch code

Code: [Select]
extern byte MW_navbtn;


// in setup() after addUsrNav call

MW_navbtn=4;  // force 4 buttons mode



I found the cause but not the solution.
In my original code I use already your suggestion for 4 button call as you ammended the code for me.
I undressed my code step by step using the all variable sample.
At one point it was exactly the same except for 2 lines of code....................

This causes the screen not jump to userscreen.
When I // the line I get the userscreen to show. As soon as I remove the // then the userscreen does not show.
Code: [Select]
// initialize the menu object (20 colums x 4 rows LCD)
  menu.addUsrNav(navMenu); // @@@@@@@@@@@@@@@@@@@@@@ this causes the  userscreen not to show!!!!!!!!!!!!!1
  MW_navbtn=4;  // force 4 buttons mode

Never to old to learn and I learn every day


Update on using Menwiz library with the LCDI2cw library.

It Works.
2 edits to menwiz.h, 5 edits to menwiz.cpp and it works Great.
I have successfully run the menwiz example sketch Test_all_var_types using the standard 6 button menu.navButtons method.

Menwiz is a powerful, flexible, easy to use library. Many thanks to the author for writing it and especially for his help in identifying the needed code changes to work with a different LCD I2C library other than LiquidCrystal_I2C.


Go Up