ttn_decoder_lorawan.js
1 // TinyLoRa - Raspberry Pi CPU Load Decoder 2 function Decoder(bytes, port) { 3 var decoded = {}; 4 5 // Decode bytes to int 6 var CPU_Load = (bytes[0] << 8) | bytes[1]; 7 8 // Decode int to float 9 decoded.CPU_Load = CPU_Load / 100; 10 11 return decoded; 12 }