mLink 4x4 Matrix Keypad
The mLink 4x4 matrix keypad is a panel mountable serial (I2C/IIC) 16 key tactile keypad. On the rear of the keypad is mounted a mLink module which continuously scans the keypad (with automatic debouncing) for any key presses. If a key is pressed the module stores the key as an 8 bit ASCII value which can then be read out of its serial interface. It is compatible with other mLink or standard I2C modules allowing you to daisy-chain several different types of modules together using only the two I2C pins of your microcontroller.
The mLink 4x4 matrix keypad is a panel mountable serial (I2C/IIC) 16 key tactile keypad. On the rear of the keypad is mounted a mLink module which continuously scans the keypad (with automatic debouncing) for any key presses. If a key is pressed the module stores the key as an 8 bit ASCII value which can then be read out of its serial interface. It is compatible with other mLink or standard I2C modules allowing you to daisy-chain several different types of modules together using only the two I2C pins of your microcontroller.
For Arduino users you can use the mLink library (see below) to control any type of mLink module. Only one single instance of the library is needed to control multiple types of mLink modules resulting in very little resources overhead and therefore making it great for Arduinos with small amounts of memory and pin counts.
For Raspberry Pi users we have a Python module which can be installed via pip or downloaded and installed directly from our forum. Please see the mLink Python forum thread for requirements and download link here
Module specifications:
Module code: | HCMODU0188 |
Supply voltage (VDD): | 3.3V to 5.5V |
Operating range (recommended): | -5 to 105oC |
Keypad type: | 16 key matrix tactile keypad in 4x4 arrangement |
Current consumption (idle): | 4.5mA |
Interfaces: | I2C, Keypad |
I2C Interface speed: | 400kbits/s (fast mode) |
I2C default address (HEX): | 0h55 |
Maximum number of modules: | 5 with pullups fitted, 112 with pullups removed* |
Module dimensions (inc headers): | 46mm x 14mm x 11mm |
Keypad dimensions (inc module): | 68.5mm x 65mm x 17mm |
*Note the maximum number of connected modules will depend on cable lengths and power requirements of each module. Do not exceed 5 mLink modules connected in series with all pullups fitted.
Arduino Connection Example:
Because the modules use an I2C interface this also means multiple modules can be controlled from a single Arduino I2C interface simply by daisy-chaining them together. Note to control multiple mLink modules of the same type requires changing the default I2C address of the additional modules. See mLink Library Quick Start Guide for how to do this.
-
#include "mLink.h" // Include the library
-
-
mLink mLink; // Create an instance of the library
-
-
#define I2C_ADD 0x55 // Default I2C address
-
-
void setup()
-
{
-
Serial.begin(9600);
-
-
mLink.init(); // Initialise the library
-
}
-
-
-
void loop()
-
{
-
char key = mLink.read(I2C_ADD, KEYPAD_4X4_KEY); // Read the key status
-
-
if(key) // Has a key been pressed ?
-
{
-
Serial.print("Key: "); // If so then print out the key
-
Serial.println(key);
-
}
-
}
Library, guides, register map, etc available on our support forum here.