Matrix Keypad – reducing the pins from 8 digital to 1 analog on Arduino [How to]

This is my second video. A tutorial on how to use a matrix keypad with just one pin of an Arduino. One reason why I started my Youtube channel with the keypad review video was that I knew that I could make this video afterwards. This was one of the projects that I tinkered with when learning about the Arduino soft- and hardware last year.
You can download the sketch and the library here: AnalogMatrixKeypad
Buy the keypad here: Ebay Matrix Keypad

the sketch:

#include
#define analogPin 0
AnalogMatrixKeypad AnMatrixKeypad(analogPin);

void setup(){
Serial.begin(9600);
}

void loop(){
char Key = AnMatrixKeypad.readKey();
if(Key != KEY_NOT_PRESSED)
Serial.println(Key);
}


2 Responses to Matrix Keypad – reducing the pins from 8 digital to 1 analog on Arduino [How to]

  1. Hi, i’m trying to test your code from “Matrix Keypad – reducing the pins from 8 digital to 1 analog on Arduino” but i’m having some promblems with it since i get this errors:

    core.a(main.cpp.o): In function `main':
    C:\Program Files\Arduino\hardware\arduino\cores\arduino/main.cpp:40: undefined reference to `setup’
    C:\Program Files\Arduino\hardware\arduino\cores\arduino/main.cpp:43: undefined reference to `loop’

    Can you give me a litle help please?

    • Avatar Experimentaltechnik
      Experimentaltechnik says:

      Hello,
      I think this means that either the Matrix Keypad library isn`t correctly imported in the Arduino IDE or something is wrong with your Arduino IDE.
      Wait, maybe you didn`t see that it needs a library? I should give the links on my website a different colour. – I changed it to blue now.