MultiTech MultiConnect mDot with Arduino and Ubidots

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. This example benefits from its onboard processor to read data from analog inputs and send it to Ubidots.

To be able to see the data streamed by the mDot you will need a LoRa gateway. Check out our LoRa MultiTech MultiConnect Conduit tutorial here

Requirements

Setup

1.- Put the mDot on the UartsBee.

2.- Use some jumper wires to connect the UartsBee to the Arduino, following this pinout:

UartsBee - Arduino UNO
GND - GND
VCC - 5V
TX - 11
RX - 10

3.- Download the ubidots-arduino-dot library here.
4.- In the Arduino IDE, click on Sketch -> Include Library -> Add .ZIP Library
5.- Select the ubidots-arduino-mdot ZIP file and then “Accept” or “Choose”
6.- Close the Arduino IDE and open it again.

Send one value to Ubidots

To send an analog reading over LoRa to Ubidots open the Arduino IDE, paste the following code and flash it into your device. Don’t forget to change the Network name, password and sub-band so that they match the ones from your LoRa gateway.

#include "ArduinoMdot.h"
#define SSID "Conduit_LoRa_Network_Name"
#define PASS "Conduit_LoRa_Network_Password"
#define SUB_BAND "1" // Number of your sub band of LoRa 1-8
#define VARIABLE_NAME 1  // Depends of the number it'll be send a setted nameUbidots client;

void setup() {
  Serial.begin(115200);
}

void loop() {
  float value = analogRead(A0);
  client.loraVerify(SSID, PASS, SUB_BAND);
  client.loraSend(2.1230, VARIABLE_NAME);
}

Did this answer your question?