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[10] = temp5 >> 8;
data[11] = temp5 & 0xFF;
Payload sent : temp5 = -3456
Decoder at TTN :
var temp5 = (bytes[10] << 8)| bytes[11];
Payload receive and decoded at TTN = 62080