How can I change a varible through my menu structure

How can I set up the code to change these through the menu interface?

Any code samples you have would be a great help to me. 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

Thank you for any assistance,

Terry :blush:


Maybe it is better to ask here:,99693.0


I would like to help, but really I don't understand your problem, and most importantly I can't read this code!

I suggest you use: :)

(I prefer the Allman-style indent, but can't find an online tool for this..)

CTRL+T in the IDE would suffice.

I spotted this: the noButtonPressed() function returns a value:

int noButtonPressed()
    return MW_BTNULL;

But when you call it, you just throw it away:

    if(buttonValue >= 1000)
        buttonPressed = 0;
        noButtonPressed();                   // is calling an extra fucntion

Also as a matter of coding style, I suggest you never omit { and } when writing an if() statement, even if there is only one statement inside that block. It helps code readability and maintainability (i.e. fewer "accidental" bugs).


It is finished!!!

Thank you for all of your suggestions and patience, I found the error of my ways... placement of the code location and values/calculations I used were incorrect.

Thanks to all!