i want you complete this code,  the getKeypadValue(int minVal, int maxVal) function in order to add after minVal and maxVal in input a text that have to be shown on the lcd screen in order to ask the  kind of information (timer, Min_PH, heure_ph, relay number...) :  #include <Keypad.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <DS3232RTC.h>
#include <Streaming.h>

// Pin configuration and libraries initiation
const byte ROWS = 4;
const byte COLS = 4;
// Définition des broches du clavier matriciel
byte rowPins[ROWS] = { 33, 32, 31, 30 };
byte colPins[COLS] = { 29, 28, 27, 26 };
// Définition des touches du clavier matriciel
char keys[ROWS][COLS] = {
  { '1', '2', '3', 'A' },
  { '4', '5', '6', 'B' },
  { '7', '8', '9', 'C' },
  { '*', '0', '#', 'D' }
};
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);
LiquidCrystal_I2C lcd(0x27, 20, 4);
DS3232RTC rtc;

const int Relai_depart = 34;
const int NUM_RELAYS = 8;a
int RELAY_PINS[NUM_RELAYS];
bool relayStates[NUM_RELAYS];
int timer[NUM_RELAYS];
int forcing[NUM_RELAYS];
float tension_relai[NUM_RELAYS];
float intensite_relai[NUM_RELAYS];
float puissance_relai[NUM_RELAYS];

//Paramètre programme horaire (PH)
const int Quantite_PH = 5;
int Statut_PH[Quantite_PH] = {0};
int Heure_PH[Quantite_PH] = {0};
int Min_PH[Quantite_PH] = {0};
int Relai_PH[Quantite_PH] = {0};
int Duree_PH[Quantite_PH] = {0};
int Repetition_PH[Quantite_PH] = {0};


// Variables
int relayPins[12] = {34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45};
int buttonPin = 18;
float temp1, temp2, temp3, temp4;
float hum1, hum2, hum3, hum4;

void setup() {
  Wire.begin();
  rtc.begin();

  for (int i = 0; i < 12; i++) {
    pinMode(relayPins[i], OUTPUT);
    digitalWrite(relayPins[i], LOW);
  }

  pinMode(buttonPin, INPUT_PULLUP);
  lcd.init();
  lcd.backlight();
}

void loop() {
  if (digitalRead(buttonPin) == LOW) {
    mainMenu();
  }
}

void mainMenu() {
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("A-Relays  B-Info");
  lcd.setCursor(0, 1);
  lcd.print("D-Quit");

  char key = keypad.waitForKey();
  switch (key) {
    case 'A': relaysMenu(); break;
    case 'B': infoMenu(); break;
    case 'D': lcd.clear(); lcd.noBacklight(); break;
  }
}

void relaysMenu() {
  int relay = 0;
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Enter relay #");
  
  // Collect relay number (1-12)
  do {
    char key = keypad.waitForKey();
    if (key >= '1' && key <= '9' && relay * 10 + (key - '0') <= 12) {
      relay = relay * 10 + (key - '0');
      lcd.print(key);
    }
  } while (relay == 0);

  relay = relay - 1; // Adjust the relay index (0-11)

  lcd.setCursor(0, 1);
  lcd.print("A:ON/OFF B:TIMER ");
  lcd.setCursor(0, 2);
  lcd.print("C:Program D:Exit ");

  bool exit = false;
  while (!exit) {
    char key = keypad.waitForKey();
    int value;
    
    switch (key) {
      case 'A':
        relayStates[relay] = !relayStates[relay];
        break;
        
      case 'B':
        value = getKeypadValue(0, 999);
        if (value > -1) {
          relayStates[relay] = 1;
          timer[relay] = value;
        }
        break;
        
      case 'C':
        value = getKeypadValue(0, 24);
        if (value > -1) {
          Heure_PH[relay] = value;
          value = getKeypadValue(0, 60);
          if (value > -1) {
            Min_PH[relay] = value;
            timer[relay] = getKeypadValue(1, 999);
          }
        }
        break;
        
      case 'D':
        exit = true;
        lcd.clear();
        lcd.noBacklight();
        break;
    }
  }
}

int getKeypadValue(int minVal, int maxVal) {
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Enter value (");
  lcd.print(minVal);
  lcd.print("-");
  lcd.print(maxVal);
  lcd.print("):");

  int value = 0;
  bool exit = false;
  while (!exit) {
    char key = keypad.waitForKey();
    
    if (key >= '0' && key <= '9') {
      int newVal = value * 10 + (key - '0');
      if (newVal >= minVal && newVal <= maxVal) {
        value = newVal;
        lcd.print(key);
      }
    } else if (key == '*') {
      return -1; // Cancel entry
    } else if (key == '#') {
      exit = true;
    }
  }
  
  return value;
}

void infoMenu() {
  // Handle displaying and interacting with the info menu
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("A-Temp   B-Hum");
  lcd.setCursor(0, 1);
  lcd.print("D-Quit");

  bool quit = false;
  while (!quit) {
    char key = keypad.waitForKey();
    switch (key) {
      case 'A': showTemps(); break;
      case 'B': showHumidity(); break;
      case 'D': quit = true; break;
    }
  }
}

void showTemps() {
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("T1:");
  lcd.print(temp1, 1);
  lcd.setCursor(0, 1);
  lcd.print("T2:");
  lcd.print(temp2, 1);
  lcd.setCursor(0, 2);
  lcd.print("T3:");
  lcd.print(temp3, 1);
  lcd.setCursor(0, 3);
  lcd.print("T4:");
  lcd.print(temp4, 1);

  keypad.waitForKey();
}

void showHumidity() {
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("H1:");
  lcd.print(hum1, 1);
  lcd.setCursor(0, 1);
  lcd.print("H2:");
  lcd.print(hum2, 1);
  lcd.setCursor(0, 2);
  lcd.print("H3:");
  lcd.print(hum3, 1);
  lcd.setCursor(0, 3);
  lcd.print("H4:");
  lcd.print(hum4, 1);

  keypad.waitForKey();
}