HackSpace – September 2019

(Jacob Rumans) #1

TUTORIAL


Let’s learn LoRa!


t seems that the terms LoRa and
LoRaWAN are everywhere at the moment,
but what are they? LoRa is a platform for
sensors to communicate wirelessly over long
range; LoRaWAN is essentially the same, but
when the receiver receives something from
a LoRa sensor device, commonly called a ‘node’, it
acts as a ‘gateway’, sending the information onto
the internet. In this tutorial, we’re going to work
through some simple LoRaWAN activities and
connect a LoRa node to ‘The Things Network’, a
crowdsourced network of gateways. This enables us
to receive data from a node and transmit some data
across the internet to a nice dashboard displaying
our data.
We are going to work with The Things Uno, which
is essentially an Arduino-shaped board that has the
LoRa communications chip built into it. We can also
program The Things Uno using the Arduino IDE, so

I


Explore LoRa and LoRaWAN and transmit


temperature and humidity to an online dashboard


Let’s learn LoRa!


Jo Hinchliffe


@concreted0g

Jo is a contributor
to the Libre Space
Foundation, and is
passionate about all
things DIY space. He
loves designing and
scratch-building both
model and high-power
rockets, and releases
the designs and
components as open-
source. He also has
a shed full of lathes,
milling machines, and
CNC kit!

Figure 1
The Things Uno wired up
to a DHT11 sensor that
can sense temperature
and humidity

the first thing is to download and install the latest
Arduino IDE software from hsmag.cc/APNJVV.
To test that The Things Uno board is working,
let’s upload a simple program to check the board.
Connect your The Things Uno to your computer
using the micro USB cable. In the Arduino IDE, click
Tools > Board, and then check it’s set to ‘Arduino
Leonardo’. Next, click Tools > Port, and select the
port that includes the label ‘Arduino Leonardo’ to
ensure the Arduino IDE is communicating with the
correct port.
Next, click File > Examples > 01.Basics > Blink,
and then click the verify button (looks like a tick on
the top left of the screen), and then click the upload
button (the right-pointing arrow button next to the
verify button). All being well, after a few seconds
your The Things Uno should have a flashing LED
that is connected to pin 13 on the board (one of the
four green LEDs next to the micro USB port).
Free download pdf