Download Print this page
Arduino HCMODU0188 Quick Start Manual
Arduino HCMODU0188 Quick Start Manual

Arduino HCMODU0188 Quick Start Manual

Mlink matrix 4x4 keypad

Advertisement

Quick Links

Arduino Quick Start Guide and
Examples for
mLink Matrix 4x4 Keypad
(HCMODU0188)

Advertisement

loading
Need help?

Need help?

Do you have a question about the HCMODU0188 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Arduino HCMODU0188

  • Page 1 Arduino Quick Start Guide and Examples for mLink Matrix 4x4 Keypad (HCMODU0188)
  • Page 2 I2C (IIC) serial master interface. The above example shows a mLink module connected to an Arduino Uno’s I2C interface. It can be powered via a 5V or 3.3V supply (depending on the logic levels you require the modules digital IO pins to operate at, and voltage requirements of any additional mLink modules connected to the modules I2C output).
  • Page 3 Connecting multiple mLink modules Each mLink module includes pullup resistors (10K), which are required for the SDA and SCL data lines. This allows up to 5* mLink modules to be connected directly to an I2C master without any additional hardware or modifications. *note maximum number of modules will be dependent on data cable lengths and module power requirements.
  • Page 4 Step 2) Installing the mLink Library Adding the mLink library to your Arduino IDE can be done in the same way as any other standard Arduino library: First download the mLink.zip file from the software section of our support forum here: https://hobbycomponents.com/mLink...
  • Page 5 Step 3) Including the mLink library in your sketch Adding the mLink library to your sketch consists of 3 steps; Firstly, include the mLink header file (mLink.h) at the top of your sketch, create an instance of the library, then finally initialise the library inside the startup() function: // Step 1: Include the mLink library #include...
  • Page 6: Quick Start Examples

    Quick Start Examples Reading the last pressed key The module will continually scan the keypad for keypress and will store the last (or current) key to be pressed. Therefore obtaining the last key pressed is simply a case of reading the modules key register.
  • Page 7 Reading the key pressed state To determine if a key is currently pressed you can use the mLink libraries Keypad_4x4_Key_Down(add) macro. If any of the keypad keys are currently pressed it will return a ‘1’. If none of the keys are currently pressed it will return a ‘0’. The following example gets the key pressed state and outputs it to the monitor window.
  • Page 8 Changing the I2C address To change the module's address you can use the libraries write() function. The following example changes the module's I2C address from the default 0x55 to 0x56. The new address will automatically be saved into non-volatile memory and so will retain the new address even after power has been removed from the module.
  • Page 9: Factory Reset

    Factory Reset Should you wish to restore the module back to its factory default configuration, this can be done by manually forcing a factory reset. All mLink modules include a set of pads labelled clear: Note, exact location of clear jumper may vary on your module To perform a factory reset carefully short the two pads together with a piece of wire or with something conductive such as a paperclip.
  • Page 10: Copyright Notice

    DISCLAIMER The mLink range is a series of modules intended for the hobbyist and educational markets. Where every care has been taken to ensure the reliability and durability of this product it should not be used in safety or reliability critical applications. This document is provided "as is".