SkillAgentSearch skills...

CayenneLPPDecode

Arduino Library to decode CayenneLPP package to a Json format.

Install / Use

/learn @ricaun/CayenneLPPDecode
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

This repository is archived and if you need a similar library you can use the CayenneLPP library.

CayenneLPPDecode

This is an Arduino Library Compatible to Decoder Cayenne Low Power Payload to Json format (ArduinoJson).

Dependences

This library uses the ArduinoJson library.

Installation

Documentation

Examples

The library comes with examples. After installing the library you need to restart the Arduino IDE before they can be found under File > Examples > CayenneLPPDecode.

Quickstart

CayenneLPP Input

lpp.addDigitalInput(1, 0);
lpp.addDigitalOutput(2, 1);
lpp.addAnalogInput(3, 1.23f);
lpp.addAnalogOutput(4, 3.45f);
lpp.addLuminosity(5, 20304);
lpp.addPresence(6, 1);
lpp.addTemperature(7, 26.5f);
lpp.addRelativeHumidity(8, 86.6f);
lpp.addAccelerometer(9, 1.234f, -1.234f, 0.567f);
lpp.addBarometricPressure(10, 1023.4f);
lpp.addGyrometer(1, -12.34f, 45.56f, 89.01f);
lpp.addGPS(1, -12.34f, 45.56f, 9.01f);

CayenneLPPDecode Json Output

{
  "digital_in_1": 0,
  "digital_out_2": 1,
  "analog_in_3": 1.23,
  "analog_out_4": 3.45,
  "luminosity_5": 20304,
  "presence_6": 1,
  "temperature_7": 26.5,
  "relative_humidity_8": 86.5,
  "accelerometer_9": {
    "x": 1.234,
    "y": -1.234,
    "z": 0.567
  },
  "barometric_pressure_10": 1023.4,
  "gyrometer_1": {
    "x": -12.34,
    "y": 45.56,
    "z": 89.01
  },
  "gps_1": {
    "latitude": -12.34,
    "longitude": 45.56,
    "altitude": 9.01
  }
}

Json Field

The json field name was based on The Things Network payload format Cayenne LPP.

<img src="imgs/ttn_fields.png" alt="ttn_fields">

Do you like this library? Please star this project on GitHub!

Related Skills

View on GitHub
GitHub Stars9
CategoryDevelopment
Updated2y ago
Forks1

Languages

C++

Security Score

75/100

Audited on Dec 9, 2023

No findings