Convert Serial input to numeric keypad function

Hello, I am currently working with fingerprint as to how it will input id numbers using numeric keypad. The code given below is used for my serial input numbers. Also I want it just to limit it to 5 IDs. Thank you so much!

uint8_t readnumber(void) {
  uint8_t num = 0;
  
  while (num == 0) {
    while (! Serial.available());
    num = Serial.parseInt();
  }
  return num;
}

Well, that was a well-formed request!

Perhaps the OP is just showing off the result of a great deal of hard work.

jremington:
Perhaps the OP is just showing off the result of a great deal of hard work.

What OP?