Arduino Input through Keypad

I am totally new to Arduino and trying to make a small project. Basically I am using a 4 x 4 matrix keypad to get inputs from the user. First the user enters the first value and then the second value. Both inputs are 2 digit numbers. The Arduino saves the first and second inputs into an array. So I am stuck on this part and cant figure out how to get two inputs. Example: Please Enter the First Input: (User Enters) Please Enter the Second Input: (User Enters) Then the Arduino takes both values and run calculations. Thank You !!!

You can use this diagram to configure the board and the keypad. You can use any board that has at least 7 digital inputs, because that’s how many pins the keypad uses.

Here is a sample program for use with the keypad.

And this is the Key Pad library which will help you understand and change the code to make it what you want.

Here is basic example for what you need. I don’t actually have keypad myself so I wasn’t able to test this to see if it will compile. But this is the basic idea.

(Note: this is in the void loop() so it will keep running over and over. You need to program it to what you want it do. If you run into any problems feel free to upload your code here in the programming section and we can help you solve any issues that may arise.)

#include <Keypad.h>

const byte ROWS = 4; // Four rows
const byte COLS = 4; // Three columns
// Define the Keymap
char keys[ROWS][COLS] = {
// Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins.
byte rowPins[ROWS] = {39, 41, 43, 45}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {31, 33, 35, 37}; //connect to the column pinouts of the keypad

// Create the Keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

void setup(){
  keypad.addEventListener(keypadEvent); //add an event listener for this keypad

void loop(){
  Serial.println("Please Enter the First Input: ");
  char input1 = keypad.waitForKey();
  Serial.println("Please Enter the First Input: ");
  char input2 = keypad.waitForKey();
  int total = input1 + input2
  Serial.println("Your total is ");