fab-lab.eu
Published

Jumpstart Into the #IoT with The Things Network (LoRaWAN)

This is most likely the easiest way to get started with The Things Network - node coding - just innovate at lighting speed!

IntermediateFull instructions provided1,982
Jumpstart Into the #IoT with The Things Network (LoRaWAN)

Things used in this project

Hardware components

#IoT Octopus
×1
Adafruit LoRa Radio FeatherWing - RFM95W 900 MHz - RadioFruit
and some 1N4001 diode
×1

Software apps and online services

IoT Werkstatt - Arduino Portable 1.8.5 including Ardublock
Ardublock with LoRaWAN / TheThingsNetwork "Superblock"

Story

Read more

Schematics

Configuration of the LoRa Wing

Code

Payload Decoder

JavaScript
function Decoder(bytes, port) { // Decode an uplink message from a buffer (array) of bytes to an object of fields.
var decoded = {}; //
decoded.port = port;
decoded.humidity = 0; decoded.temp = 0; decoded.pressure=0;
if (port === 10) {  // Port selection
  decoded.humidity = (parseFloat((bytes[0] << 8) | bytes[1]).toFixed(2))/10;
  decoded.temp = (parseFloat((bytes[2] << 8) | bytes[3]).toFixed(2))/10;
  decoded.pressure = (parseFloat((bytes[4] << 8) | bytes[5]).toFixed(2))/10;
}
return decoded;
}

Credits

fab-lab.eu

fab-lab.eu

22 projects • 275 followers
Maker!

Comments