© Copyright 2016 by The-Box Development

Get sensor data

 

The LoRaWAN shield is equipped with a temperature and humidity sensor (the white component). We will be using an existing arduino library to access this sensor.

 

To install the library, select 'Sketch', 'Include Library', 'Manage libraries'.

Type 'DHT' in the search box (top right):

Select 'DHT sensor library' by clicking on the listing. Next select version 1.2.2 from the dropdown (version 1.2.3 and 1.3.0 are broken) and click on 'Install'. (Click on "More info" if the drop down with different versions is not available)

Close the 'Library Manager' after the installation.

 

Use 'File', 'Examples', 'DHT sensor library', 'DHTtester' to open a sketch to get data from the sensor. The default pin definition matches our setup so just compile and upload the sketch.

Example output in the serial monitor: