LCD menu help

HI guys,

I am trying to make menus within my HD44780 20x4 and I am struggling.

I’m not sure if this is the best route to do this but i am trying to create void functions for the various menus so when programming the loop i can access these menus without having to repeat the coding however i am struggling.

Please help me, code is below:
#include <Wire.h>
#include “RTClib.h”
RTC_DS1307 RTC;
#include <LiquidCrystal.h>

int backLight = 10;

const int numRows = 4;
const int numCols = 20;
const byte Symbol_1 = B10110000;
const byte Symbol_2 = B01111110;

LiquidCrystal lcd(12,11,5,4,3,2);

void setup()
{
pinMode (backLight, OUTPUT);

//RTC
Wire.begin();
RTC.begin();

//lcd boot up screen
digitalWrite(backLight, HIGH);
lcd.begin(numCols,numRows);
lcd.setCursor(6,0);
lcd.print(“WELCOME”);
lcd.setCursor(1,1);
lcd.print(“Dosing Pump Module”);
lcd.setCursor(5,2);
lcd.print(“By JUNBLUD”);
lcd.setCursor(4,3);
lcd.print(“Loading:”);
for (int i = 0; i <= 100; i++)
{
lcd.setCursor(12,3);
if (i<100) lcd.print(" “);
if (i<10) lcd.print(” “);
lcd.print(i);
lcd.print(”%");
delay(100);
}
delay(2000);
lcd.clear();
}

void mainMenu(int symbolNum, int symbolCol, int textNum int textCol, int bulletText)
{
lcd.setCursor(0,0);
lcd.print(“Main Menu”);
lcd.setCursor(symbolNum,symbolCol);
lcd.write(Symbol_1);
lcd.setCursor(textNum,textCol);
lcd.(bulletText);
}

void loop()
{
mainMenu(0,1, 2,1, “Pump 1”);
mainMenu(0,2, 2,2, “Pump 2”);
mainMenu(0,3, 2,3, “Set Schedule”);
mainMenu(10,1, 12,1, “Pump 3”);
mainMenu(10,2, 12,2, “Settings”);
} [/table]

Maybe you can get a few ideas here:

mrburnette:
Maybe you can get a few ideas here:
Tutorial: manage menu and LCD display with Arduino – Coagula – Giuseppe Di Cillo

I agree, recently I develop a menu to be displayed on LCD and navigated with pushbuttons using this article.