Matrix Keypads are among the simplest and most popular ways to enter keyboard information into Arduino type micro-controllers. I already made a tutorial showing how you can connect Keypad to Arduino Nano. The downside is that to connect the keypad you will need to use 8 Digital Pins from the Arduino. This significantly reduces the pins available for other purpose. As I have shown in this tutorial, you can use I2C GPIO PCF8574/PCF8574A to add more pins to Arduino. You can use the same module to connect the Keypad, and use only 2 of the Arduino pins.
In this tutorial I will show you how easy it is to connect Matrix Keypad to Arduino with the help of I2C GPIO PCF8574/PCF8574A Module and program in with Visuino.
Step 1: ComponentsArduino Nano
Connect the Matrix Keypad connector to the pins P0 to P7 of the PCF8574/PCF8574A GPIO Module (Picture 1 and 2).
Step 4: Start Visuino, and select the Arduino Board typeTo start programming the Arduino, you will need to have the Arduino IDE installed from here: http://www.arduino.cc/.
Please be aware that there are some critical bugs in Arduino IDE 1.6.6.
Make sure that you install 1.6.7 or higher, otherwise this tutorial will not work!
The Visuino: https://www.visuino.com also needs to be installed.
First we need to add component to control the PCF8574/PCF8574A GPIO:
The Keypad component is very flexible and can contain variety of pins. It can contain Digital pins controlling individual digital values (On/Off) or character pins grouped in groups with common output. In this example we will add a group of character pins.
Next we need to assign Character values to each key. We will start with the first row:
Now we will continue assigning Character values to the remaining rows the same way as we did for the first row in the previous step:
Congratulations! You have completed the project.
Picture 1 shows the connected and powered up project.
If you open Serial Terminal in the Arduino IDE or Visuino, and start typing on the Keypad, you will see the characters you type appear in the serial terminal (Picture 2)
On Picture 3 you can see the complete Visuino diagram.Also attached is the Visuino project, that I created for this Tutorial. You can download and open it in Visuino: https://www.visuino.com
Matrix Keypads are among the simplest and most popular ways to enter keyboard information into Arduino type micro-controllers. I already made a tutorial showing how you can connect Keypad to Arduino Nano. The downside is that to connect the keypad you will need to use 8 Digital Pins from the Arduino. This significantly reduces the pins available for other purpose. As I have shown in this tutorial, you can use I2C GPIO PCF8574/PCF8574A to add more pins to Arduino. You can use the same module to connect the Keypad, and use only 2 of the Arduino pins.
In this tutorial I will show you how easy it is to connect Matrix Keypad to Arduino with the help of I2C GPIO PCF8574/PCF8574A Module and program in with Visuino.
Step 1: ComponentsArduino Nano
Connect the Matrix Keypad connector to the pins P0 to P7 of the PCF8574/PCF8574A GPIO Module (Picture 1 and 2).
Step 4: Start Visuino, and select the Arduino Board typeTo start programming the Arduino, you will need to have the Arduino IDE installed from here: http://www.arduino.cc/.
Please be aware that there are some critical bugs in Arduino IDE 1.6.6.
Make sure that you install 1.6.7 or higher, otherwise this tutorial will not work!
The Visuino: https://www.visuino.com also needs to be installed.
First we need to add component to control the PCF8574/PCF8574A GPIO:
The Keypad component is very flexible and can contain variety of pins. It can contain Digital pins controlling individual digital values (On/Off) or character pins grouped in groups with common output. In this example we will add a group of character pins.
Next we need to assign Character values to each key. We will start with the first row:
Now we will continue assigning Character values to the remaining rows the same way as we did for the first row in the previous step:
Congratulations! You have completed the project.
Picture 1 shows the connected and powered up project.
If you open Serial Terminal in the Arduino IDE or Visuino, and start typing on the Keypad, you will see the characters you type appear in the serial terminal (Picture 2)
On Picture 3 you can see the complete Visuino diagram.Also attached is the Visuino project, that I created for this Tutorial. You can download and open it in Visuino: https://www.visuino.com