Skip to content

ph2lb/ttnenschede_env_node

Repository files navigation

ttnenschede_env_node

Description :

Revision :

  • 2018-apr-11 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 :

You can use Cayenne LPP ofa 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

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published