LoRa is a modulation technique with a significantly long range. The modulation is based on spread-spectrum techniques and a variation of chirp spread spectrum (CSS) with integrated forward error correction (FEC). Mdot is a node to connect an IoT project with a LoRa network.
Before to di this tutorial, you need to do the MultiConnect Conduit tutorial, and set the Network name, password and sub-band channel. This tutorial ishere
- Put the mDot on the UartsBee
- With some wires connect the UartsBee with Arduino UNO, follor the next table: ||| |:---:|:---:| |UartsBee|Arduino UNO| |GND|GND| |VCC|5V| |TX|11| |RX|10|
- Download the Ubidots ArduinoMdot library here
- Now, click on Sketch -> Include Library -> Add .ZIP Library
- Select the .ZIP file of ArduinoMdot and then "Accept" or "Choose"
- Close the Arduino IDE and open it again.
To send one value to Ubidots API you need to open the Arduino IDE and paste the next code, don't forget to change the Network name, password and sub band.
Be careful if the firmware of your mDot isn't compatible with firmware of your MultiConnect Conduit, the mDot won't connect to your Conduit LoRa Network.#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 name
Ubidots client;
void setup() {
Serial.begin(115200);
}
void loop() {
float value = analogRead(A0);
client.loraVerify(SSID, PASS, SUB_BAND);
client.loraSend(2.1230, VARIABLE_NAME);
}