alexxtasi / LoRaWAN_TTN_Env_Node

BME280 and Adruino ProMini based enviromental node with LMIC ABP.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LoRaWAN_TTN_Env_Node

Description :

Revision :

  • 2017-jul-17 1.0 first "beta"

Hardware used :

  • Arduino Pro-Mini 3.3V
  • RFM95W
  • BME280 sensor.

Software and libraries used :

For licenses of the used libraries, check the links above.

Aditional note :

I use a HTTP integration on the TTN with the decoder / payload function below. :

function Decoder(bytes, port) 
{
  var retValue =   { 
    bytes: bytes
  };
  
  retValue.batt = bytes[0] / 10.0;
  if (retValue.batt === 0)
     delete retValue.batt; 
 
  if (bytes.length >= 2)
  {
    retValue.humidity = bytes[1];
    if (retValue.humidity === 0)
      delete retValue.humidity; 
  } 
  if (bytes.length >= 3)
  {
    retValue.temperature = (((bytes[2] << 8) | bytes[3]) / 10.0) - 40.0;
  } 
  if (bytes.length >= 5)
  { 
    retValue.pressure = ((bytes[4] << 8) | bytes[5]); 
    if (retValue.pressure === 0)
      delete retValue.pressure; 
  }
   
  return retValue; 
} 

About

BME280 and Adruino ProMini based enviromental node with LMIC ABP.


Languages

Language:C++ 99.8%Language:C 0.2%