you dont have to add anything for this class. you can use TTN cayenne LPP example code which simplifies the coding and can be used with much ease. arduino-device-lib/CayenneLPP.ino at master Ā· TheThingsNetwork/arduino-device-lib Ā· GitHub and add an analog input just by using: lpp.addAnalogInput(uint8_t channel, float value); where you to add the channel and the analog value reading.
@jeryl.cook From the github repository I see #define LPP_ANALOG_INPUT_SIZE 4 // 2 bytes, 0.01 signed and #define LPP_ANALOG_OUTPUT_SIZE 4 // 2 bytes, 0.01 signed Since itās signed 0.01 that would make the min/max -327.68 to 327.67. If you need larger ranges you can try Energy and Concentration data types. Let me know if that answers your question.
I did do a bit of research on why last night it is 2 bytes long, thatās 16 bits. The range of a 16 bit twoās complement number is from -32768 to 32767.
0.01 units to represent a single bit that gives you a range of -327.68 to 327.67. which is your answer! Thanks again.
Yes, just those two. I was talking to one of the cayenne devs and that what they said. You can also manually send that payload if you want, but itās just not in a convenient package yet.
Not sure what you mean by chirpstack tells the wrong type. But in cayenne 0x7D type is not supported. The only datatypes are from the table shared above.