Go Down

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


That program was written with old MENWIZ library 1.1 that was supporting the 4 and 6 buttons. The new version of MENWIZ support only 6 buttons so change the lines
Code: [Select]

and remove or comment this line:
Code: [Select]
The rest is variable declaration problem, tempF variable should be global and defined at the top above Setup();
post the total sketch here.
Simply...You can't afford me..

Author Of:

Oops..some one gave me Karma...:)


Jan 04, 2013, 04:41 pm Last Edit: Jan 04, 2013, 05:27 pm by Thomas_berg_ Reason: 1

Just a guess .... as I am an absolute beginner ..... it seems a library problem ... do you have all the necessary library included ?

not lib prob got new from terry that one is ok.

but thanks all for showing intrest i relly like this forum  i whill soon be back with probs for you to help me with . joust bought some books on arduino programing  "Practical Arduino Cool Projects for Open Source Hardware and the Beginning Arduino Programming "  hope ther good cu all..

Thanks khalid i saw that one , and it compile's with "menu.addUsrNav(navmeny,4);"    on    1.2Menwiz   1.0.3 ide


I love when users help each other  :)
The latest version should support also the 4 buttons via addusrnav (sorry i did not tested myself, so please confirm it).
So guys, which is the feature you would like be implemented next?

p.s. for who implemented a custom device using addusrnav: if you could briefly write a solution description with callback code I would like to insert into manual, in order to help other users!


Jan 06, 2013, 04:33 am Last Edit: Jan 06, 2013, 03:11 pm by Thomas_berg_ Reason: 1
So here i go again new day new bits to bite  :smiley-red:

So far i got Menwis1.2 with analog 6button  "yippi 5more digital ports"  and terrys meny build with temp and 3reley.

so to cut to the problem Terry does farenheit me no understand me european haha okey , i have tryed my best to solv this geting 5v to 0-1023 aka 1024 and all of that look't att examples that cover the never ending *5,0 /1024 *100 /10 soooo many diferent combinations even some that devide by 8,0 insted of 10  seems moore than confusing too me  and if that whas not enogh we got some  (average*5000)/1024; going on in the code that i dont get..  soo it's an LM35D that im having a fist fight with wish i could read italian haha , could some handy more whise than me see what im doing wrong   ( i have //out all that has with farenheit to do i hope i did that right and i named ALL temF to tempC i probobly missed some thing temp stays at 10 C anything but the room 25 C  :-)

i think i whill crash into bed now zzZZzZzZ gees 4:30 AM in sweden bye..

code is in attachment  everything but the temp works i think.  sorry if temp probs is not realy this topic but sinns we are modding with Menwin i thought that i kept my problems here while doing menwis..  UPDATED: 6/1/2013 soo i remover the Offset in volts sinns LM35D does NOT go minus centigrade :-) still it moves little fishy but it is in range so if anybody can se obvious fault in code i think i got it.
UPDATED: i did also tie Vout from lm35D to Ground with a 560Ohm resistor and that seems to make it more acurate not showing 2celcius low :-) is that okey to tie Vout to ground with no -V or Vref :-) :-( hehe Vout on Lm35  2,69 on my FLUKE and display cant relly make its mind upp 26 27 26 27 close enogh fore me.  room temp 27C

And thanks to  Brunialti Terry Backbone and all involved  all credits will be in code when done :-)


Ciao Thomas,
.... always from a beginner .... the temperature sensor has some characteristic, the relation between Volt and T. As far as I know,is generally 0,01 V = 1 kelvin degree  and celsius = kelvin -273.
.... this could be a start ... it's important to understand which sensor you use because not all the sensor give the same value ... sorry if I'm obvious or wrong, as I said ... absolute beginner :-)


I tried looking at this yesterday but, unfortunately, it only seems to work with a particular implementation of LiquidCrystal_I2C, the same one as compatible in the New LiquidCrystal Library.

My I2C backpacks work with the other I2C implementation, the one that controls the backlight through the I2C bus, rather than a dedicated arduino pin.

Are thee any plans to make MENWIZ compatible with more than one LCD connection method, as it rather limits scope for take up in this guise, but otherwise looks like it could be an excellent library.

If it were to be included as core library then it would need to work with any LCD connection, certainly with the shields available.

Many thanks.


Menwiz works on any interface method supported by (new) LiquidCrystal.
(new) liquidCrystal library works with the following interfaces (as in https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home)

- 4 bit parallel LCD interface
- 8 bit parallel LCD interface
- I2C IO bus expansion board with the PCF8574* I2C IO expander ASIC such as I2C LCD extra IO.
- ShiftRegister adaptor board as described Shift Register project home or in the HW configuration described below, 2 and 3 wire configurations supported.
- ShiftRegister 3 wire latch adaptor board as described ShiftRegister 3 Wire Home
- Support for 1 wire shift register ShiftRegister 1 Wire

some users adapted Menwiz library to other libraries (to support devices from webrobots , fugaku etc).  I would like to include a summary by the author of such mods in the doc.
I think  it is quite enough ...  8)


The New LiquidCrystal library is not limited to any aparticular HW wiring or driver as far as pin out is concerned. The base constructor does assume a particular wiring for all the drivers it is capable of handling, but every class has constructors that enable users to configure the pin mapping of their LCD.

You just need to look at the header files for each driver and see the flexibility.

As far as the backlight is concerned, once again, the default constructor does not assume support for the backlight. However, the I2C flavour of the library does support the control of the backlight, you just need to invoke the correct constructor when crating the LCD object. Again, you need to look in the header files to see which method suits your needs.

Will it be extened to support other I2C IO extension ASICs, it will. Currently it supports the PCF8574 and compatibles which is very much standard.

The other thing that is very nice about the library is that you just need to add a new class, with a few methods to support any other driver you can think off (just need to pass how to write to the device and control the backlight). The rest is done for you.


I forgot to mention, that the adaptions that #brunialti mentions are just one line of code: the creation of the object that his library uses, a simple pin mapping call in the constructor. He then uses a reference to the abstract class "LCD" throughout his menu library regardless of the LCD or driver used.

@bruinalti - great work. Every time I look it improves by the hour!!!


Very much appreciate the superb support you guys give in responding so quickly.

I will delve a little deeper into what you've said.

It would be great to switch to using the new library and give MENWIZ a proper try out too.

Many thanks again.


May be i found a bug. Do the line duplication occours when you set root menu as collapsed menu?
If it is true that is a bug I detected and solved. Probably I need to anticipate the release of 1.2.0. version to fix the problem

Salute brunialti,
Due to big size of my code of suntracker, i revert to your version MenWiz1.1,  Can you also rectify the above line duplication bug in MENWIZ1.1?
Thank you for the support.
Simply...You can't afford me..

Author Of:

Oops..some one gave me Karma...:)


Jan 06, 2013, 05:33 pm Last Edit: Jan 06, 2013, 05:37 pm by brunialti Reason: 1
Khalid, what's the  problem with size? The 1.2 should'nt differ from 1.1.


Khalid, what's the  problem with size? The 1.2 should'nt differ from 1.1.

The v1.1 library is 28K whereas v1.2 library is 29K... However, i still have 3K programm memory in hand.. Your MENWIZ library is awesome :)
Simply...You can't afford me..

Author Of:

Oops..some one gave me Karma...:)


for all people interested in "odd" button models (that is 3 or 5 button models) I give you a *very simple* patch to implement it now. The next version will consolidate the change.

Inside the library is implemented a "logical level" where are defined all actions performed  after a button push.
Those functions are private members of class menwiz,  so it is necessary to make just one  change to the MENWIZ.h file, moving  the  definition of actBTE() from private to public. That is all.

In your sketch you can implement a menu entry acting exactly as the escape button as following (example):

Code: [Select]

void bte(){

I'm also trying to use a 5 button analog and can't make the above line compile. It does work if I leave this in Private
Code: [Select]
void     actBTE();
and use this in Public: with the menu.actBTE commented out. Also BTE needs to be all capitols.
Code: [Select]
void     BTE();
/* {

When the menu.actBTE is not commented I get these errors :
C:\arduino-1.0.3\libraries\MENWIZ/MENWIZ.h: In member function 'void menwiz::BTE()':
C:\arduino-1.0.3\libraries\MENWIZ/MENWIZ.h:202: error: 'menu' was not declared in this scope

I don't have my display handy so I can't test the compiled code to see if it works.

I'm no c++ expert so I'm not quite sure what to do with this.


After getting the *new* LiquidCrystal library owing with my I2C expanders I had a quick try of MENWIZ examples last night.

It looks very good and I'll try some altering of menu code in a short while.

Incidentally I'm testing with a 16x2 and it seems fine on two line displays.

One question though:-

The way I would want to use this is as a settings menu that only appears when entered on startup. It will set parameters for a game.

I can see that I'd do this by setting a variable for menu=1 and enter a while loop with the me u worker process running. When I exit the menu then I'll set menu=0 and drop into my main loop.

It looks like there is no lcd.begin() in the main sketch, but rather controlled in the library. This seems to assume that the menu has exclusive use of the LCD.

I will use the LCD for other things too, with the menu only used when required. At start I will have a splash screen, then an optional key combination to enter setup menu. This will be followed by screens showing the current game settings, before a countdown time to start the game, at which point the display will then be a scoreboard display.

Settings will only be able to be hanged at startup, analogous to entering PC BIOS settings.

Can I do this with MENWIZ? Since the LCd is initialized with the menu, it seems that if I don't enter the menu I wouldn't need to do so. But, if I do go into the menu then I might end up with trying to initialize the same lcd object twice.

Go Up