Hi there,including or uncommenting eeprom support had no effect because I didn't use it anyway. I tried different values of MAX_MENU. With 25 it has freeRam of 198. With 30 it has 98 and produces the error, with 29 it has 118 and the values in the las menu jump around wild but the menu point still is available after leaving the menu, with 28 it has 138 freeRam and everything works fine. I hope it still does when I have created all of the scetch.

Thanks, calim

@elpaso: good idea with the label duplication. I'll try it for my time-setting menus. However, I don't know how to declare a const __FlashStringHelper*. When I try

About eeprom : you have to comment #define EEPROM_SUPPORT *AND * you have to not include the EEPROM.h lib in your sketch. In this way MENWIZ saves some memory both in progmem (about 900 bytes) and in ram memory (just a little bit) independently from the fact that you use or not the provided methods.

I think the next version will include a check to control duplicated label strings ... It seems to be too easy to implement ... to not implement it .

I hope to optimize the code in order to save some memory (but I think it could be not more than about 100 bytes). In the meantime if you use arduino Mega or any compatible board with the same microcontroller (or even better the Due) you of course will have no problems ...

EDIT the duplication check is a nonsense code. Once you insert F("....") inside the sketch code you allocate at compile time the space. The method inside MENWIZ only store the pointer of type "const __FlashStringHelper*". It does not allocate any memory. The only way to spare memory is to pass a pointer variable to a const __FlashStringHelper data type for any duplicate string. But that is up to the user. Menwiz cannot do any memory save at that point.

#include <Wire.h>#include <Time.h>#include <LCD.h>#include <LiquidCrystal_I2C.h>#include <buttons.h>#include <MENWIZ.h>//#include <EEPROM.h> so it seems it is not the eeprom that's eating up RAM but one of the other libraries. When I have time I will do the whole menu and check the memory again. May be next week. Then I'll try lower values of MAX_MENU.Thanks! calim

First... the section "DEFINE BOARD PINS FOR THE NAVIGATION BUTTONS" I have verified my electronics by continuity test to the pins on the ATMEL, ATMEGA328 and they are attached correctly with a 10K SIP Resistor pack to ground, the only button that works is the DOWN, I can scroll through the S1 menu but the CONFIRM, UP, ESCAPE, LEFT & RIGHT buttons do not work, any assistance you can offer is greatly appreciated?

Second... the section ("// menu.addSplash(("TLHurley Engineering 12'\nEMZ Technologies 09/2012") menu.sbuf, 10000);") returns an error ( Expected ")" before "menu" ) why is this? I have the line commented out to verify the sketch compiles. I cannot find what the actual error is.

s2=menu.[color=#CC6600]addMenu[/color]([color=#006699]MW_VAR[/color],s1,F([color=#006699]"Test float var"[/color])); [color=#7E7E7E]//add a terminal node (that is "variable"); [/color] s2->[color=#CC6600]addVar[/color](MW_AUTO_FLOAT,&f,11.00,100.00,0.5); [color=#7E7E7E]//create a variable of type "float number"... [/color] [color=#7E7E7E]//...associated to the terminal node and bind it to the app variable "f" of type float[/color] s2=menu.[color=#CC6600]addMenu[/color]([color=#006699]MW_VAR[/color],s1,F([color=#006699]"Test byte var"[/color])); [color=#7E7E7E]//add a terminal node (that is "variable"); [/color] s2->[color=#CC6600]addVar[/color](MW_AUTO_BYTE,&b,25,254,10); [color=#7E7E7E]//create a variable of type "byte"...[/color] [color=#7E7E7E]//...associated to the terminal node and bind it to the app variable "b" of typr byte[/color] s2=menu.[color=#CC6600]addMenu[/color]([color=#006699]MW_VAR[/color],s1,F([color=#006699]"Test boolean var"[/color])); [color=#7E7E7E]//add a terminal node (that is "variable"); [/color] s2->[color=#CC6600]addVar[/color](MW_BOOLEAN,&bb); [color=#7E7E7E]//create a variable of type "boolean" [/color] [color=#7E7E7E]//...associated to the terminal node and bind it to the app variable "bb" of type boolean[/color] s1=menu.[color=#CC6600]addMenu[/color]([color=#006699]MW_VAR[/color],r,F([color=#006699]"WRITE TO SERIAL"[/color])); [color=#7E7E7E]//add a terminal node (that is "variable") create an "action" associated to the terminal node... [/color] s1->[color=#CC6600]addVar[/color](MW_ACTION,act); [color=#7E7E7E]//the act function as default will be called when enter button is pushed[/color]

s1=menu.[color=#CC6600]addMenu[/color]([color=#006699]MW_VAR[/color],r,F([color=#006699]"SAVE TO EPROM"[/color])); [color=#7E7E7E]//add a terminal node (that is "variable") create an "action" associated to the terminal node... [/color] s1->[color=#CC6600]addVar[/color](MW_ACTION,savevar); [color=#7E7E7E]//the act function as default will be called when enter button is pushed[/color]

s1=menu.[color=#CC6600]addMenu[/color]([color=#006699]MW_VAR[/color],r,F([color=#006699]"LOAD FROM EEPROM"[/color])); [color=#7E7E7E]//add a terminal node (that is "variable") create an "action" associated to the terminal node... [/color] s1->[color=#CC6600]addVar[/color](MW_ACTION,loadvar); [color=#7E7E7E]//the act function as default will be called when enter button is pushed[/color]

int navMenu() // called from menu.draw { /* As soon as a button is pushed the first time flag 1 is set to HIGH and if the buttonnumber is not 0 then a timer is started. The menu action then should only be performed once. After 2000 msecs the flag will be set to LOW and a new buttonpush can be processed. Menu action is blocked for 2000 msec even if the same button is being kept pressed for 2000 msecs by flag2. */

long menublockTime = millis();

if (buttonAct == 1 && buttonPressed != 0 && stopMenu == 0) // we have a state were we process a menu navigation step once and block it for 2 secs { digitalWrite(led13Pin,HIGH); // set timer led ON menuOffTime = menublockTime + 2000; //start the timer. You can change this blocking time to your convenience but do not make it lower aa 200 msecs stopMenu = 1;

I was not aware of the conflict with dual purposing the D0 (RXD) and D1 (TXD) for button use. I am using Digital Pins 7-12 for the display output, is there something in your Libraries that prevent the use of these pins for button use?

also, I was wondering about the addsplash issue in my previous post, can you address the line of code and tell me why I get the error?

Thank you I will attempt to modify my code and prototype to accommodate the 4 button system you have here this will free up my digital pins for sensor inputs. I like the idea of the single Analog Pin for all 4 buttons too.

I am still learning C++ and this interface for Arduino. My menus are working but I do not have the Integer Variables for (HEAT ON, PRIMARY FAN ON, and SECONDARY FAN ON) called out in my Menu structure yet (type byte, increment 1, values 32 - 99). This is in Fahrenheit. My current code is attached.

Basically I want to be able to set the temperature through the interface in Fahrenheit 32 - 99 degrees for HEAT, COOL, and SECONDARY FAN.

Terry, with your code you correctly implemented the overall menu structure.Now for each terminal node (that is after each addMenu of type MW_VAR) you need to create you variables.For instance, if you want to create an int variable to be managed by the menu you have at first to declare a int global variable (the variable you'll test in your code) and after addMenu call use the addVar method:

The code does the following:- create your sketch vatiable to test (temp1)- create the terminal node ("COOL ON AT: ")- create the menu variable of the above terminal node: the variable is of type int, is binded with your variable temp1, the value ranges between 32 and 39 and increment by step of 1

You need to use as many addVar as terminal nodes you defined.By the way for small values you can also use byte variables.