Basic LCD Menu

Was looking for a little advice on making just a basic LCD menu for a 1602 LCD.

Its going to be a temperature and humidity controller for my friends terrarium. The sensor is the DHT22.

I already have all of the code written for turning on and off heater as well as humidifier but I have never done a menu before. I'd like to run the menu with 3-4 buttons, Set - Up - Down and maybe Back/Cancel.

It just needs to be very basic just be able to set lower and upper temp points as well as lower and upper humidity points. And when the menu isn't in use, just have it display the temp and humidity readings.

Is there any good examples out there for just a basic one? I've seen a few examples, but they look overly complex for what I need.

Thanks

i just build a menu ,, for my 16.2 and flight case :stuck_out_tongue:
maybe this can help
it has sub menu then you make a choise and it wil ask are you sure ,, then again you press button
then it wil run it , til the select button i use button 2 for this ,, go back to menu ,,
nice for fishy ! :grin:
i hope you understand the code a bit ,,

#include <LiquidCrystal.h> 
LiquidCrystal lcd(12, 11, 6, 5, 4, 3);
int op =1;
int sel =1;
int selc =1;
int buttnPin1 = 2;
int buttnPin2 = 7;
int buttnPin3 = 8;
void setup(){
}

void loop (){
  if (sel < 1 || sel > 6 ) sel = 1;
  else  if (sel == 1){ 
    int buttn1 = digitalRead(buttnPin1);
    int buttn2 = digitalRead(buttnPin2);
    int buttn3 = digitalRead(buttnPin3);
    lcd.begin(16,2);
    lcd.print("  MENU SELECT  ");
    if (op < 3 || op > 6 ) op = 3; 
    lcd.setCursor(0,1);
    if (buttn1 ==HIGH)op = op +1; 
    if (buttn2 ==HIGH)sel = 2; //select option
    if (buttn3 ==HIGH)op = op -1;  
    if (op ==3 )lcd.print("*** option 1 ***"); 
    if (op ==4 )lcd.print("*** option 2 ***"); 
    if (op ==5 )lcd.print("*** option 3 ***"); 
    if (op ==6 )lcd.print("*** option 4 ***"); //make a choise and press select to go further //
    delay(250);
  } 
  else if (sel == 2){              
    int buttn1 = digitalRead(buttnPin1);
    int buttn2 = digitalRead(buttnPin2);
    int buttn3 = digitalRead(buttnPin3);
    if (buttn1 ==HIGH)sel = 1; 
    if (buttn2 ==HIGH)sel = op; //select option
    if (buttn3 ==HIGH)sel = 1;  
    lcd.begin(16,2);
    lcd.print(" ARE YOU SURE ?  ");
    lcd.setCursor(0,1);
    if (op ==3 )lcd.print("*** option 1 ***"); 
    if (op ==4 )lcd.print("**  option 2  **"); 
    if (op ==5 )lcd.print("*** option 3 ***"); 
    if (op ==6 )lcd.print("**  option 4 **"); 
    delay(350);
    lcd.begin(16,2);
    lcd.print(" PRESS RED OK ");
    delay(750);
  }
  else if (sel == 3  ){  // tracker system option 1 //
    int buttn2 = digitalRead(buttnPin2);
    if (buttn2 ==HIGH)sel = 1; //select option
    lcd.begin(16,2);
    lcd.print(" PRESS RED OK ");
  }
  else if (sel == 4  ){  // tracker system option 2 //
    int buttn2 = digitalRead(buttnPin2);
    if (buttn2 ==HIGH)sel = 1; //select option
    lcd.begin(16,2);
    lcd.print(" PRESS RED OK ");
  }
  else if (sel == 5  ){  // tracker system option 2 //
    int buttn2 = digitalRead(buttnPin2);
    if (buttn2 ==HIGH)sel = 1; //select option
    lcd.begin(16,2);
    lcd.print(" PRESS RED OK ");
  }
  else if (sel == 6  ){
    int buttn2 = digitalRead(buttnPin2);
    if (buttn2 ==HIGH)sel = 1; //select option
    lcd.begin(16,2);
    lcd.print(" PRESS RED OK ");
  }
}

Is there any good examples out there for just a basic one? I've seen a few examples, but they look overly complex for what I need.

LOL i had same isue , this works simple if you get it ,,

you can make it bigger and use more buttons also ,,
it uses a simple aproach ,, like menu i use numbers example val = 1 at boot ,,
val 1 = menu one , when in menu one i make a choise to second menu just for the looks ,,
i dont get it LOl i made this when i smoked some green stuff , and whoop there it is :art:

All you need to know is the LiquidCrystal library. There should be a reference for it on the libraries page.

Well don't know if I did it as efficiently as I could have, but it works as intended.

Tried to post the code but it told me its too long lol. Oh Well.

OsiViper:
Well don't know if I did it as efficiently as I could have, but it works as intended.

Tried to post the code but it told me its too long lol. Oh Well.

Think you could put it on pastebin or something? I'm having some issues myself...

if it works it works ,,, ! 8)