Note: Documentation for the AllThingsTalk LoRaWAN RDK has been moved to AllThingsTalk Learning Centre.
Documentation below has been deprecated.
This step by step guide will help you set up your first working Sodaq Mbili LoRaWAN experiment. It will show how to send data from the Mbili to the AllThingsTalk cloud by connecting a pushbutton.
To install the Arduino LoRaWAN RDK, go to Sketch > Include library > Add .ZIP library in your Arduino IDE. Select the arduino-lorawan-rdk-master .zip file you just downloaded and click open.
Alternatively, unzip the file and copy the contents to your Arduino library folder.
First we need to create our device.
If you just created a new account, you will have a default ground called playground. You can use this ground to create your device or create a new ground if you want.
pushbutton
example sketchpushbutton
example sketchpushbutton-payload-definition.json
in the textarea. You find this file in the examples/binary-payload folder of the arduino-lorawan-rdkNext we need to add these keys of our device (dev addr, apps key and nwks key) to our example sketch, so it knows where to send its data. You can find them under SETTINGS > Connectivity of the device you just created.
keys.h
file as shown below1 | uint8_t DEV_ADDR[4] = {0x08, 0x1B, 0x3A, 0x74}; |
We are now ready to upload and run our sketch!
Simply hit the upload icon in the Arduino IDE. This will save the sketch, compile it and upload it to your Arduino.
After uploading, you might need to flip the power switch on the Sodaq Mbili OFF and back ON to make sure the Mbili reboots and starts up our sketch.
Try press the Button. This should send its state to AllThingsTalk and update the Binary Sensor accordingly.
Alternatively, you can also open the Tools > Serial monitor of the Arduino IDE. This can be very useful when debugging your own sketches.
- Make sure you select the correct COM port to listen (under Tools > Port )
- When the monitor is open, make sure the Baud rate is set to 57600
As a next step, please try these basic experiments connecting the Grove sensors from the kit
For more info on Grove sensors and Actuators as found in the AllThingsTalk kit, please check our Sensors and Actuators page.