Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for 4x4 keypad (0~9 + A, B, C, D) #27

Closed
rtek1000 opened this issue May 5, 2019 · 1 comment
Closed

Example for 4x4 keypad (0~9 + A, B, C, D) #27

rtek1000 opened this issue May 5, 2019 · 1 comment

Comments

@rtek1000
Copy link

rtek1000 commented May 5, 2019

If someone needs to use a 4x4 keypad of this model of the image, can try with this configuration:

keypad 4x4

const byte ROWS = 4; //four rows
const byte COLS = 4; //three columns
char keys[ROWS][COLS] = {
  {'1','2','3','A'},
  {'4','5','6','B'},
  {'7','8','9','C'},
  {'*','0','#','D'}
};
byte rowPins[ROWS] = {5, 4, 3, 2}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {9, 8, 7, 6}; //connect to the column pinouts of the keypad
@rtek1000 rtek1000 closed this as completed May 5, 2019
@rtek1000
Copy link
Author

rtek1000 commented May 5, 2019

To avoid use of jumpers (Arduino Nano/Pro Mini):

/*
 * Arduino pins - keypad pins
 * 2- keypad 1 face a (green wires)
 * 3- keypad 2 face a
 * 4- keypad 3 face a
 * 5- keypad 4 face a
 * 6- keypad 5 face b (yellow wires)
 * 7- keypad 6 face b
 * 8- keypad 7 face b
 * 9- keypad 8 face b
 */
byte rowPins[ROWS] = {2, 3, 4, 5}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {6, 7, 8, 9}; //connect to the column pinouts of the keypad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant