© Copyright 2016 by The-Box Development

Installing the shield

 

We're finally at the point were we're going to start using the LoRaWAN shield.

 

NOTE

A few rules when working with the shield:

  • Always disconnect the Arduino from all power sources before connecting or disconnecting a shield.
  • Never power the Arduino and shield combination without a mounted antenna.

 

Disconnect the arduino from the computer.

 

Take the LoRaWAN shield from the anti-static zip bag, remove the anti-static pad from the connector pins and mount the shield on top of the arduino. The position of the antenna connector is near the power connector of the arduino.

 

Mount the antenna on the connector.

Connect the USB cable to the arduino and the computer and start the arduino IDE.

 

Add the Shield API

 

The LoRaWAN module on the shield is controlled with ASCII commands. Implementing sketches using these commands is time consuming so for ease of use we are going to use an API written for TheThingsUno. Because the TheThingsUno is largely compatible we can use that library with our shield.

Download the modified TheThingsUno library.

 

To add the ZIP file to the arduino IDE, open the 'Sketch' menu, select 'Include library', 'Add ZIP Library'.

In the dialog select the file you just downloaded. The status bar should now display 'Library added to your libraries.'

 

Getting the hardware ID

 

The RN2483 LoRaWAN module on the shield has an unique identifier build in. In the next step we need this identifier. To get the identifier we are going to use a sketch included in the examples for the library we just installed.

 

Open the 'File' menu and select 'Examples', 'TheThingsUno'. Select 'Device Info' from the list.

 

Compile and upload the sketch using the arrow icon. Now we want to view the output of the sketch. For this we need to open the serial monitor. Open the 'Tools' menu and select 'Serial Monitor'.

A new window will open, in this window the output of the sketch is displayed. Make a note of the 16 character string listed after DevEUI.