This pr adds arduino compatibilty (import as .zip functionality).
Besides this a basic usage example was added.
Code to reproduce:
#include <CayenneLPP.h>
/* The buffer size to initialize the CayenneLPP instance with */
#define BUFFER_SIZE 100
/* The measurement channel from which the measurements were measured
* Both the data and measurement channel will be bundled and sent over LoraWAN
* See the README of CayenneLPP
*/
#define GPS_MEASUREMENT_CHANNEL 1
void setup() {
/* Nothing here :) */
}
void loop() {
CayenneLPP CayenneEncoder(100);
CayenneEncoder.addGPS(GPS_MEASUREMENT_CHANNEL, 10.0, 50.0, 20.0);
CayenneEncoder.addGPS(GPS_MEASUREMENT_CHANNEL, 10.0, 5.0, 20.0);
}
#include <CayenneLPP.hpp>
/* The buffer size to initialize the CayenneLPP instance with */
#define BUFFER_SIZE 100
/* The measurement channel from which the measurements were measured
* Both the data and measurement channel will be bundled and sent over LoraWAN
* See the README of CayenneLPP
*/
#define MEASUREMENT_CHANNEL 1
void setup() {
/* Nothing here :) */
}
void loop() {
/* Statically Initialize the CayenneLPP encoder with 100 bytes buffer */
CayenneLPP::CayenneLPP<BUFFER_SIZE> CayenneEncoder;
CayenneLPP::Measurement_t GPSMeasurement = CayenneLPP::SetGPS(10.0, 50.0, 20.0);
CayenneEncoder.setMeasurement(MEASUREMENT_CHANNEL, GPSMeasurement);
GPSMeasurement = CayenneLPP::SetGPS(5.0, 50.0, 20.0);
CayenneEncoder.setMeasurement(MEASUREMENT_CHANNEL, GPSMeasurement);
}
This pr adds arduino compatibilty (import as .zip functionality).
Besides this a basic usage example was added.
Code to reproduce:
The benefits in flash and ram are: