# Internet-of-Things – Lab Exercise 4
This lab exercise’s topic is LoRaWAN. We will use the LoRa Boards provided by the IoT-LAB: ST B-L072Z-LRWAN1 boards with ST MEMS extension X-NUCLEO-IKS01A2.
We will set up a LoRaWAN application which sends data over a network server; finally, we will connect our app to an application server (for a graphical presentation of our data. We will use the same setup as we did for lab exercises 1 & 2: Ubuntu 18.04. (VM) with RIOT-OS and the IoT-Lab.
Document your work with screenshots and thorough explanation where applicable.
Group members: <Gaelle Knibbeler, Anna Kastlunger, Judyta Krzyzak>
Move to your examples directory in RIOT-OS and look for the example lorawan and follow the steps in
https://tinyurl.com/loralab
## I. First Steps with TTN
Registered with TTN, created new application, registered device, wrote the corresponding values to the Makefile, built the board and uploaded it to IoT-Lab. With the correct payload we were getting TTN output as can be seen below.
Provide a screenshot of your data output at TTN.


Device EUI - 0070AA8D42103D15
App EUI - 70B3D57ED0031989
App Key - 656473400680F220155B36005B88CCC1


## II. LoRa Example with Sensor Data, TTN, and Cayenne
Download the zip file from Moodle:
lab4_02_lorasensor.zip
Move the unzipped directory into your /myRIOT/examples/ directory and follow the steps back in the hackmd.
Document your steps here with screenshots (IoT-Lab, TTN, myDevices) and thorough explanation.



- What is your data output at TTN?


- How is your data presented on the myDevices dashboard?
Simple values (just like RSSI and SNR in the screenshot below). But we can improve that!
- Adjust the settings of the widgets: e.g. display temperature as line chart. Use various widgets.
Set the widget of temperature to Gauge and the widget of humidity to Graph.


- You can download your data als Excel file (or look at it at right there)

- Upload zip file containing main.c, Makefile.
At first our code had some flaws (Screenshot below) but we were able to fix them (still had some code from exercise 1 in there that was not needed anymore).

## III. Going Further – Get 5 Bonus Points
Add the lps22hb atmospheric pressure sensor values to the Cayenne LPP payload.
- Provide screenshots: IoT-LAB, TTN, myDevices.



- Upload zip file containing main.c, Makefile.
Upload lab protocol (pdf), zip-file(s) to Moodle until July 9th, 2020; 11:59pm.