-
Notifications
You must be signed in to change notification settings - Fork 50
4. Examples
On this page, you will find a brief explanation of the examples included in the library.
A simple LoRaWAN sketch that uses the CayenneLPP library to send sensor data. The code is written for an Arduino board with an RFM95 LoRa module.
In combination with the Beelan library, this example is able to send random data emulating different sensors such as humidity, temperature, pressure, and battery level to a LoRaWAN service as TTN.
You must set up your LoRaWAN application in order to decode the received information.
The code is a CayenneLPP encoder and decoder. It creates a CayenneLPP package containing a variety of sensor data and then decodes the package into JSON.
The code starts by including the CayenneLPP library and declaring a CayenneLPP object. It then creates a DynamicJsonDocument object to store the decoded JSON data.
In the setup()
function, the code adds the sensor data to the CayenneLPP package.
The code then decodes the CayenneLPP package into the DynamicJsonDocument object. Finally, it serializes the JSON data to the console.
Thank you for reading our Wiki!