Ks0060 keyestudio Large Button 4*4 Matrix Keypad for Arduino: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
<br>
==Large Button 4*4 Matrix Keypad for Arduino==
==Large Button 4*4 Matrix Keypad for Arduino==
<br>[[File:KS0060 (6).jpg|500px|frameless|thumb]]<br>
<br>[[File:KS0060 (6).jpg|500px|frameless|thumb]]<br>


<br>
==Introduction==
==Introduction==
In the application system of microcontroller, keyboard is essential in man-machine dialogue. When you are short of a button, you can connect one to the I/O port of the comtroller; but when you need a lot of buttons with limited I/O port resources, this 4*4 Matrix Keypad is no doubt your best choice.  <br>   
In the application system of microcontroller, keyboard is essential in man-machine dialogue. When you are short of a button, you can connect one to the I/O port of the comtroller; but when you need a lot of buttons with limited I/O port resources, this 4*4 Matrix Keypad is no doubt your best choice.  <br>   
4*4 matrix keypad is the most applied keypad form. We need to master its keypad identification technology as entry to microcontroller world. Here, we will use an examples to illustrate the identification method of 4*4 matrix keypad. The key layout is in matrix form, so with only eight I/O ports, we can identify 16 buttons, saving lots of I/O port resources.<br>
4*4 matrix keypad is the most applied keypad form. We need to master its keypad identification technology as entry to microcontroller world. Here, we will use an examples to illustrate the identification method of 4*4 matrix keypad. The key layout is in matrix form, so with only eight I/O ports, we can identify 16 buttons, saving lots of I/O port resources.<br>


Pin layout for 4*4 Large Button module:<br>
<br>
<br>[[File:ks0060-2.png|500px|frameless|thumb]]<br>
'''Pin layout for 4*4 Large Button module:'''<br>
<br>[[File:ks0060-2.png|600px|frameless|thumb]]<br>


<br>
==Circuit connection ==
==Circuit connection ==
Connect module pin 1-8 in sequence to board digital pin 2-9, as below picture.<br>
Connect module pin 1-8 in sequence to board digital pin 2-9, as below picture.<br>
<br>[[File:ks0060-3.png|500px|frameless|thumb]]<br>
<br>[[File:Ks0060-.png|700px|frameless|thumb]]<br>


<br>


==Sample program ==
==Sample program ==
The smaple code of this button module is in the folder “4*4 button experiment”. Firstly, you need to unzip class library file “Keypad.zip” and place it in subfolder “libraries” of folder “Arduino” .<br>
<span style=color:red>Firstly, you need to unzip class library file “Keypad.zip” and place it in subfolder “libraries” of folder “Arduino” .<br>
 
Codes are as below:<br>
Codes are as below:<br>


Line 46: Line 53:
</pre>
</pre>


== Upload the program ==
<br>
According to arduino tutorial, upload the program to the board.<br>


== Program function  ==
== Program test==
Upload the program to the board, open serial monitor; press certain button on the module, it will display corresponding value as below picture shows:<br>
Upload the program to the board, open serial monitor; press certain button on the module, it will display corresponding value as below picture showed:<br>
<br>[[File:ks0060-4.png|500px|frameless|thumb]]<br>
<br>[[File:ks0060-4.png|700px|frameless|thumb]]<br>


<br>
==Resources ==
==Resources ==


'''Video'''
* '''Video'''<br>
http://video.keyestudio.com/ks0060/


http://www.keyestudio.com/wp/2016/05/ks0060-keyestudio-matrix-keypad/
*'''Code and Libraries''' <br>
https://fs.keyestudio.com/KS0060


'''Datasheet'''


http://www.keyestudio.com/files/index/download/id/1463714882/
 
<br>


==Buy from ==
==Buy from ==


http://www.keyestudio.com/large-button-4-4-matrix-keypad-single-chip-extended-keypad-memb-for-arduino.html
*[https://www.keyestudio.com/free-shipping-large-button-44-matrix-keypad-for-arduino-p0229.html    '''Official Website''']
 
*[https://www.aliexpress.com/store/product/Free-shipping-MCU-Extension-4-x-4-16-Key-Matrix-Keyboard-Module-for-Arduino/1452162_2055557984.html?spm=2114.12010615.8148356.21.53e21e74cQDYcs  '''Available on aliexpress''']
 
*[https://www.amazon.com/Keyestudio-Button-Matrix-Arduino-raspberry/dp/B017SLKNAU/  '''Available on Amazon''']


https://www.amazon.com/Keyestudio-Button-Matrix-Arduino-raspberry/dp/B017SLKNAU/ref=sr_1_fkmr0_1?srs=13497667011&ie=UTF8&qid=1487126430&sr=8-1-fkmr0&keywords=Large+Button+44+Matrix+Keypad%2F+Single-chip+Extended+Keypad%2F+Memb


[[category:Module]]
[[category:Module]]

Latest revision as of 13:49, 2 March 2021


Large Button 4*4 Matrix Keypad for Arduino


thumb


Introduction

In the application system of microcontroller, keyboard is essential in man-machine dialogue. When you are short of a button, you can connect one to the I/O port of the comtroller; but when you need a lot of buttons with limited I/O port resources, this 4*4 Matrix Keypad is no doubt your best choice.
4*4 matrix keypad is the most applied keypad form. We need to master its keypad identification technology as entry to microcontroller world. Here, we will use an examples to illustrate the identification method of 4*4 matrix keypad. The key layout is in matrix form, so with only eight I/O ports, we can identify 16 buttons, saving lots of I/O port resources.


Pin layout for 4*4 Large Button module:

thumb


Circuit connection

Connect module pin 1-8 in sequence to board digital pin 2-9, as below picture.

thumb


Sample program

Firstly, you need to unzip class library file “Keypad.zip” and place it in subfolder “libraries” of folder “Arduino” .

Codes are as below:

#include <Keypad.h>
const byte ROWS = 4; // define row 4
const byte COLS = 4; // define column 4
char keys[ROWS][COLS] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
// connect row ports of the button to corresponding IO ports on the board
byte rowPins[ROWS] = {2,3,4,5};	
// connect column ports of the button to corresponding IO ports on the board
byte colPins[COLS] = {6,7,8,9};
// call class library performance function of Keypad 
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
void setup(){
Serial.begin(9600);
}

void loop(){
char key = keypad.getKey();
if (key != NO_KEY){
Serial.println(key);
}
}


Program test

Upload the program to the board, open serial monitor; press certain button on the module, it will display corresponding value as below picture showed:

thumb


Resources

  • Video

http://video.keyestudio.com/ks0060/

  • Code and Libraries

https://fs.keyestudio.com/KS0060



Buy from