So, it seems like the gps and temperature data is working properly, so let's isolate the bytes related to the analog input.
02 02 9f 50
02 => Channel 2
02 => Analog Input
9f50 => Hex Value
According to the LPP docs, the data resolution for an analog input is 0.01 signed
When converted from a signed hex value to a decimal value,
-22136. Then, taking into account the 0.01 data resolution, this becomes
To send 4340, you would need to send a hex value of
69f500 this decodes to a decimal value of
434000 and then, taking 0.01 resolution into account, you would get
4340. However, LPP only provides a 2 byte buffer for analog input values.
My suggestion for you is this:
I'm assuming the value 4340 is millivolts, not volts. So, you can divide your variable by 1000 before sending to cayenne. The dashboard will then show a value in volts, rather that millivolts. The value would be 4.34. Your payload would look like this:
02 02 01 b2
I hope this helps!
Let me know if you have any further questions.