The MultiConnect® mDot™ is a LoRaWAN™ ready module, capable of 2-way communication over distances in excess of 10 miles / 16 km outdoors. The mDot brings a low power ARM® Cortex®-M4 processor, running ARM’s mbed™ OS, along with developer friendly libraries to efficiently construct an Internet enabled solution. 

Before starting with this guide, a MultiTech MultiConnect Conduit Gateway is required and should be configured. If you need to configure the MultiTech Gateway, please refer to this getting started guide

Once you've gateway is configured you will be able to transmit data from your mDots nodes through the MultiTech Conduit Gateway previously configure to Ubidots where you can begin developing the software and front-end user engagement Application.   

Requirements

Step-by-Step 

  1. Hardware Setup
  2. Setting up the Arduino IDE 
  3. Sending data to Multitech Gateway 
  4. Summary

IMPORTANT UPDATE NOTE: The Ubidots mDot Library Version 2.0 will not make use of the Software Serial library due to multiple bugs found during repeated testing. Regrettably all of these error remove the ability to make any debug routines. We strongly advise that the library used in this tutorial should be used only as reference for POCs. If going to market with this hardware setup, Ubidots highly suggests using a privately developed firmware that points to the Ubidots API.

1. Hardware Setup  

1. Follow the table below to make the correct wire connections between the Arduino Board and the mDot module. 

For more information about the PINOUT of the mDot device, please refer here.

2. Setting up the Arduino IDE

1. Download the Arduino mDot library and install it using the Arduino IDE. For a detailed explanation of how to install libraries using the Arduino IDE, refer to this guide.  

 3. Sending data to Multitech Gateway

With the following sample code you will be able to transmit data to a MultiTech Conduit Gateway over LoRa. In case you don't have a gateway already configured to transmit data to Ubidots please reference to the following guide:

Connect a MultiConnect Conduit LoRa-to-GPRS Gateway to Ubidots over TCP/UDP

1. To begin transmitting data to the Multitech gateway, open the Arduino IDE and paste the sample code below. Once you have pasted the code, you will need to assign the LoRa SSID and LoRa Password assigned to your gateway.

Send values to Ubidots

This example is intended for sending two values to the conduit Gateway, don't forget to change the Network name, password, and sub band if you set a value different to one inside the gateway.

IMPORTANT NOTE: If the firmware version of your mDot isn't compatible with firmware of your MultiConnect Conduit Gateway, the mDot won't connect to your Conduit LoRa Network. Please ensure that the same firmware version is used to avoid future issues.

/****************************************
 * Include Libraries
 ****************************************/
#include <ubidotsMdot.h>

/****************************************
 * Define Constants
 ****************************************/
char const * SSID_NAME = "...."; // Put here your LoRa SSID
char const * SSID_PASS = "...."; // Put here your LoRa Network password

Ubidots client(SSID_NAME, SSID_PASS);

/****************************************
 * Main Functions
 ****************************************/

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
}

void loop() {
  // put your main code here, to run repeatedly:
  float value_1 = 1;
  float value_2 = 25.234;
  client.add(value_1);
  client.add(value_2, 4, 2);  // char size is four, accuracy is 2 decimals
  client.sendAll();
  delay(5000);
}

2. Verify your code within the Arduino IDE. To do this, in the top left corner of our Arduino IDE you will see the "Check Mark" icon; press it to verify your code. 

3. Upload the code into your Arduino UNO + mDot module. To do this, choose the "right-arrow" icon beside the "check mark" icon. 

After this step your mDot module will start transmitting data to the Multitech Gateway, then the gateway will forward all messages to Ubidots. 

4. Summary

With this simple tutorial you are able to transmit data from the mDots nodes to the Multitech Conduit Gateway to then forward the data to Ubidots where it can be enabled to drive good decision making.

Now its time to create Ubidots Dashboards to visualize your data and deploy your IoT solution!  Happy Developments! :) 

Other readers have also found useful...

Did this answer your question?