Menu, Charging Selector Switch

Hi, I am new to Arduino. I am trying to make a menu that display instruction to the user. They have 5 choices from the keypad. Each choice is just activating a switch, but only once choice is allowed at a time.

The problem is that it is harder than I anticipated. I am getting stuck at displaying the instruction and having the user select. Occasionally the keypad works, but you have to press it multiple times for it to register.
Again I am new to programming and If there is an easier way on doing this, I am open to it. Thanks again.

#include <LiquidCrystal.h>
#include <Keypad.h>

//constants for the number of rows and columns in the LCD
//In my example, I use a 20x4 LCD, thus it has 4 rows and 20 columns
//If you use another LCD, type in the appropriate rows and columns below
const int numRows= 4;
const int numCols= 20;

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
//initialize the library with the numbers of the interface pins

//For Keypad
const byte ROWS=2;
const byte COLS=3;

char hexaKeys[ROWS][COLS]=
{
{'1','2','3'}, //Row 1 Identifier
{'4','5','6'} //Row 2 Identifier
};

byte rowPins[ROWS]={6,7};
byte colPins[COLS]={8,9,10};
Keypad customKeypad = Keypad(makeKeymap(hexaKeys),
rowPins, colPins, ROWS, COLS);

void setup()
{
lcd.begin(numCols,numRows);
lcd.print("RSFF Direction");
Serial.begin(9600);

}
void loop()
{
LCD();
delay(500);

Meter();
delay(500);

InputPad();
delay(500);

}
void LCD()
{
lcd.setCursor(0,1);
delay(1000);

lcd.print("Choose Charging Method");
delay(4000);

lcd.clear();

//Display Selector Menu

lcd.setCursor(0,0);
delay(1000);
lcd.print("101AC Press 1");
delay(2000);
lcd.clear();

lcd.setCursor(0,0);
delay(1000);
lcd.print("APUGen Press 2");
delay(2000);
lcd.clear();

lcd.setCursor(0,0);
delay(1000);
lcd.print("Vehicle Press 3");
delay(2000);
lcd.clear();

lcd.setCursor(0,0);
delay(1000);
lcd.print("Lift Press 4");
delay(2000);
lcd.clear();
}

void Meter()
{
float input_voltage = 0.0;
float temp=0.0;
int analog_value = analogRead(A0);
input_voltage = (analog_value * 24.00) /1024.00;

if (input_voltage < 0.1)
{
input_voltage=0.0;
}
Serial.print("v= ");
Serial.println(input_voltage);
lcd.setCursor(0, 0);
lcd.print("Voltage= ");
lcd.print(input_voltage);
delay(5000);

;

}

void InputPad()
{
char customKey = customKeypad.getKey();

if (customKey)
{
Serial.println(customKey);
}
}

The symptoms you describe are usually caused by a bunch of "delay()" in the code. And guess what? You have a BUNCH.

Study the very first posting on this forum: Demonstration code for several things at the same time. Then see if you can us it as a guide to rewriting your program.

Paul

Hi, jayded70.

Please put your code between a [ code ] and a [ /code ] tag (without spaces in the parenthesis).

There is a BIG problem in your code: delay() keeps processor waiting for all the delay() time! Program runs for a moment, then it stops at the next delay(). You have to write the program in a different way. In a menu, program must continuously run: write on LCD (if something is changed), check keypad, write on LCD (if something is changed), check keypad until there is something else to do.