I am writing a code that detects a key press in a 4 X 4 keypad, it detects the row and column of the pressed key successfully and gives them to me.
The question now, how can I turn the row and column numbers of a pressed key into the ACII code of the number or letter on the key.
I use the keypad in the image below
If for example, I press the '6' key, the function gives 2 for the row and 3 for the column. If I press the 'C' key, the function gives 3 for the row and 4 for the column and so on.
How can I convert the two numbers 2(row) and 3(column) to decimal 54 that is the ACII code for the character '6' and so on.
There is the table that I have created to convert
Mathematically speaking, I need to derive the 'ASCII value' column as a function of the 'Row' and 'Column' columns.
Or if anybody has another method to convert , you are welcome to say it.