Arduino library for Hobby Components mLink range of modules. This library currently supports the following mLink products:
mLink 12 Bit port expander (SKU: HCMODU0180)
mLink DHT22 temperature and humidity sensor (SKU: HCMODU0181)
mLink 1 channel relay module (SKU: HCMODU0182)
mLink 2 channel relay module (SKU: HCMODU0183)
mLink 4 channel relay module (SKU: HCMODU0184)
mLink RGBW light controller (SKU: HCMODU0185)
mLink NTC temperature sensor (SKU: HCMODU0186)
mLink Matrix 4x4 keypad (SKU: HCMODU0188)
mLink 1602 & 2004 Character LCD (SKU: HCMODU0190A & HCMODU0190B)
mLink 12864 Graphics LCD (SKU: HCMODU0189)
mLink 6 Button Keypad (SKU: HCMODU0193)
mLink Home Sensor (SKU: HCMODU0198)
Using the mLink library
Step 1) Downloading the mLink library
Download the latest mLink.zip library from the following link.
https://hobbycomponents.com/downloads/m ... k_V1_6.zip
Save it to somewhere convenient on your computer.
Step 2) Installing the mLink Library
Once downloaded, open up your Arduino IDE and go to Sketch->Include Library->Add .ZIP Library.
In the file selection dialogue window that opens up, navigate to wherever you downloaded the mLink .zip file and select it, then click the ‘Open’ button.
Alternatively you can just unzip the library into your Arduino library folder usually found in the following location:
Usually found within the users home area under /Arduino/libraries/
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 "mLink.h"
- //Step 2: Create an instance of the library
- mLink mLink;
- void setup()
- // Step 3: Initialise the library
- void loop()
The mLink library can be used to control any type of mLink module. For specific instructions and example sketches for your mLink module please see the documentation in the products forum thread (https://hobbycomponents/com/mLink), or the example sketches found within the mLink library.
Diagrams, libraries, and example code are provided as an additional free service by Hobby Components and are not sold as part of this product. We do no provide any guarantees or warranties as to their accuracy or fitness for purpose.
Descriptions and diagrams on this page are copyright Hobby Components Ltd and may not be reproduced without permission.