Send DHT11 sensor data using The Things Uno and The Things Network to IOTA Tangle using Masked Authenticated Messaging (MAM)
This is a tutorial how to send DHT11 sensor data using The Things Uno and The Things Network to IOTA Tangle using Masked Authenticated Messaging (MAM).
All hardware requirements and how to wire the DHT11 sensor module to The Things Uno is explained in:
https://www.mobilefish.com/developer/iota/iota_quickguide_ttn_mam.html
More information about The Things Network, The Things Gateway and The Things Uno:
https://www.thethingsnetwork.org
https://www.thethingsnetwork.org/docs/gateways/gateway
https://www.thethingsnetwork.org/docs/devices/uno
The project consists of one Arduino sketch and 3 NodeJS files.
The most important files are:
-
dht11.ino: This sketch is uploaded to The Things Uno which reads the DHT11 sensor data and sends it to a LoRa Gateway (e.g. The Things Gateway). If the Gateway is connected to The Things Network server, this data can be seen in The Things Network console.
-
dht_ttn.js: This NodeJS file reads the DHT11 sensor data from The Things Network server.
-
dht_ttn_mam.js: This NodeJS file reads the DHT11 sensor data from The Things Network server. This data is processed and published to the Tangle using MAM.
-
mam_receive.js: Extract the stored data from the Tangle using MAM and display the data.
npm install
How to use the scripts see: https://www.mobilefish.com/developer/iota/iota_quickguide_ttn_mam.html