12 Button Kepad Help

So I am fairly new to Arduino, and am having some trouble understanding the input - uno conversion that was provided from my keypad.

Here is the image I got from the packaging, and am having trouble understanding which symbol matches to the arduino uno board. Any guidance would be very helpful, and sorry if this is in the wrong section, this is the closest match I could find to my issue.

.

Thank you for the reply, I realize I was an idiot and couldn't read the directions haha. How would I go about putting it into this code:

Note just incase needed this is what I have for symbol - Arduino digital #'s, also went overkill with information, sorry.

Keypad Outline:

1 2 3
4 5 6
7 8 9

  • 0 #

Symbol to aduino is:
0-0 [Keypad Output Pin(if needed)-7]
1-1 [Keypad Output Pin(if needed)-6]
2-2 [Keypad Output Pin(if needed)-10]
3-3 [Keypad Output Pin(if needed)-14]
4-4 [Keypad Output Pin(if needed)-5]
5-5 [Keypad Output Pin(if needed)-9]
6-6 [Keypad Output Pin(if needed)-13]
7-7 [Keypad Output Pin(if needed)-4]
8-8 [Keypad Output Pin(if needed)-8]
9-9 [Keypad Output Pin(if needed)-5]
#-10 [Keypad Output Pin(if needed)3]

  • not connecting
    1 on my keypad output is connected to gnd
#include <LiquidCrystal.h> //include LCD library (standard library)
#include <Keypad.h> //include keypad library - first you must install library (library link in the video description)

#define redLED 10 //define the LED pins
#define greenLED 11

char* password ="1234"; //create a password
int pozisyon = 0; //keypad position

const byte rows = 4; //number of the keypad's rows and columns
const byte cols = 4;

char keyMap [rows] [cols] = { //define the cymbols on the buttons of the keypad

  {'1', '2', '3', 'A'},
  {'4', '5', '6', 'B'},
  {'7', '8', '9', 'C'},
  {'*', '0', '#', 'D'}
};

byte rowPins [rows] = {1, 2, 3, 4}; //pins of the keypad
byte colPins [cols] = {5, 6, 7, 8};

Keypad myKeypad = Keypad( makeKeymap(keyMap), rowPins, colPins, rows, cols);

LiquidCrystal lcd (A0, A1, A2, A3, A4, A5); // pins of the LCD. (RS, E, D4, D5, D6, D7)

void setup(){

  lcd.begin(16, 2);
  pinMode(redLED, OUTPUT);  //set the LED as an output
  pinMode(greenLED, OUTPUT);
  setLocked (true); //state of the password
}

void loop(){

  char whichKey = myKeypad.getKey(); //define which key is pressed with getKey

  lcd.setCursor(0, 0);
  lcd.print("    Welcome");
  lcd.setCursor(0, 1);
  lcd.print(" Enter Password");

  if(whichKey == '*' || whichKey == '#' || whichKey == 'A' ||       //define invalid keys
  whichKey == 'B' || whichKey == 'C' || whichKey == 'D'){

    pozisyon=0;
    setLocked (true);
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("  Invalid Key!");
    delay(1000);
    lcd.clear();
  }
  if(whichKey == password [pozisyon]){

    pozisyon ++;
  }
  if(pozisyon == 4){
    setLocked (false);
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("*** Verified ***");
    delay(3000);
    lcd.clear();
    lcd.setCursor(0, 0);
    lcd.print("  Mert Arduino");
    lcd.setCursor(0, 1);
    lcd.print("Tutorial Project");
    delay(7000);
    lcd.clear();
  }
  delay(100);
}

void setLocked(int locked){
  if(locked){
    digitalWrite(redLED, HIGH);
    digitalWrite(greenLED, LOW);
    }
    else{
      digitalWrite(redLED, LOW);
      digitalWrite(greenLED, HIGH);
    }
  }

Digital inputs 0 and 1 are the RX/TX pins, recommended not to use these.

It appears this keypad is not a matrix type, you will have to write the code to scan the pins for a low.
You will need to turn on pull-ups.
The above assumes this a simple 12 switch connection with one side of each switch connected to com.

.

Moved the 1, and 0 digital farther down the line.

I got most of the code from a tutorial, is there any way you can dumb down your explanation so I can better understand what you meant. Still pretty novice with Arduino.

Do you know how to read a pushbutton switch state and turn on a LED when the switch is pressed?

The switch would be wired as S3 in the image below.
The LED would be D2.

.

I am not, people are telling me I should of gotten a 7-segment instead of this 14 one, and that I'm way over my head.

You are way over your head because you dove into the deep end.
Play in the padding pool for a while.

There are sketch examples that are included in the IDE.
These examples cover the basic areas you need to master.

Here is some home work.
Arduino links.

Watch these:

Some things to read:

https://learn.adafruit.com/category/learn-arduino

https://learn.sparkfun.com/tutorials/tags/arduino?page=all

https://learn.sparkfun.com/tutorials/what-is-an-arduino

http://playground.arduino.cc/Code/AvoidDelay

https://forum.arduino.cc/index.php?topic=384198.0

https://learn.sparkfun.com/tutorials/using-the-logic-level-converter

http://arduino-info.wikispaces.com/

https://learn.sparkfun.com/tutorials/how-to-read-a-schematic

.

Alright, I'm getting a bit more of what I'm dealing with here. My only question that I didn't really see is this.

In this 3x4 Matrix with rows and columns, I can see how the 7 input pins would work with the rows / cols, but I don't really understand it completely.

So this is our pad:

1 2 3 - Row 0
4 5 6 - Row 1
7 8 9 - Row 2

  • 0 # - Row 3

3, 6, 9, and # would be our rows
#, 0, and * would be our columns

If I attach from output - arduino:
rows:
3 - 2
6 - 3
9 - 4

- 5

cols:

- ?

0 - 7

    • 8
      How would I also add the # to columns if the output is already being taken up by the row?
      Would I have to cut the wire and split it to the 2 different arduino digital numbers?

As I mention, it appears your keypad is not a matrix type.

Use a digital meter to confirm your keypad wiring is: common to 12 switch outputs.

.

But even if I was connecting each individual key output (Which I am), as if I was hooking up individual switches, I would still have to organize it in the code as a matrix correct?

That's where I'm a bit fuzzy in the code where the corner piece would show up on the rows and columns, in this case the #.

You are not following advice given to you.

Get a DVM and confirm this keypad is: common to 12 switches.

If it is, you do not use columns and rows in your sketch.
You read each switch one at a time.

.

I asked if I was right, because it is not a Matrix like you said, but I still thought you needed rows / cols for it.

I'm just curious on the rows / columns with the corner piece in both, just because I would like to know.

And since it isn't a matrix, what would I use in it's stead.

With com connected to GND and all pull-ups are enabled on switch inputs.

At its simplest, this is what could be done:
if(digitalRead(2) == LOW)
{
Serial.print("The switch on pin 2 is pressed");
}
else
{
Serial.print("The switch on pin 2 is not pressed");
}

Reapeat this for the other switches.

.

Wire something like this.

pinMode(2, INPUT_PULLUP); //to enable the pullup on pin 2 etc.