Am trying to send negative temperature data from DB18B20 to TTN using Arduino LMIC, am able to send negative data, but TTN decoder is considering as un signed Int and changing the value from -3456 to 62080.
Please help me to decode Negative value in TTN decoder function.
Code at Arduino :
int16_t temp5 = -3456; Serial.print(" Dummy of 6th IC is: "); Serial.println(temp5); data = temp5 >> 8; data = temp5 & 0xFF;
Payload sent : temp5 = -3456
Decoder at TTN :
var temp5 = (bytes << 8)| bytes;
Payload receive and decoded at TTN = 62080