I need to help make push button down 4 menu code

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x20, 16, 2);
#define ok digitalRead(5)==1
#define down digitalRead(4)==1
#define atas digitalRead(3)==1
#define cancel digitalRead(2)==0

char state;
byte hitung;

void setup(){
pinMode (5, INPUT_PULLUP);
pinMode (4, INPUT_PULLUP);
pinMode (3, INPUT_PULLUP); //SELAMAT DATANG ICHIRO
pinMode (2, INPUT_PULLUP);
lcd.init();
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Selamat Datang");
lcd.setCursor(0,1);
lcd.print("ICHIRO");
delay(500);
lcd.clear();
}

void loop() {

switch (state){
case 0:
lcd.setCursor(1,0); // >speed
lcd.print("Speed"); // menu
lcd.setCursor(0,1);
lcd.print("ADC");

lcd.setCursor(7,0);
lcd.print("PID");
lcd.setCursor(7,1);
lcd.print("Kalibrasi");

lcd.setCursor(0,0);
lcd.print(">");

if (down){
lcd.clear();
state=1;
delay(100);
}

if (ok){
lcd.clear();
state=2;
delay(100);
}
break;

case 1:
lcd.setCursor(0,0); // speed
lcd.print("Speed"); // >menu
lcd.setCursor(1,1);
lcd.print("ADC");
lcd.setCursor(0,1);

lcd.setCursor(7,0); // >speed
lcd.print("PID"); // menu
lcd.setCursor(7,1);
lcd.print("Kalibrasi");
lcd.setCursor(0,4);
lcd.print(">");

if (atas){
lcd.clear();
state=0;
delay(100);
}
break;

case 2:
lcd.setCursor(0,0);
lcd.print("Hitung = ");
lcd.setCursor(11,0);
lcd.print(hitung);
break;

}

}

Your topic has been moved. Please do not post in "Uncategorized"; see the sticky topics in Uncategorized - Arduino Forum.

Please edit your post, select all code and click the <CODE> button; next save your post. This will make the coder easier to read and copy and the forum software will display it correctly.

Please provide a good description of the problem that you have; what is the code supposed to do and how does the current implementation differ from your expectation.

I moved your topic to an appropriate forum category @khasani007.

The Project Hub category you chose is only used for discussions directly related to the Arduino Project Hub.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

NO:

YES:
LiquidCrystal_I2C lcd(0x27, 16, 2); // IIC address 0x27