i receive 5 bytes from the serial port. data output with the code below is e.g.:
<Buffer 02>
<Buffer ce>
<Buffer 04>
<Buffer e8>
<Buffer 20>
I need this 5 bytes into one single buffer first to separate them later. Actually i need the 3rd and the 4th byte out of the buffer and convert them to decimal value. How can i get this?
// hook up data listener to echo out data as its received
serialPort.on('data', function(data) {
console.log(data);
});