I have a list of bytearrays that looks like that :
data = [
bytearray(b'\x01'),
bytearray(b'\x03'),
bytearray(b'\x04'),
bytearray(b'\x01'),
bytearray(b'\x05'),
bytearray(b'\x00'),
bytearray(b'\xC0'),
bytearray(b'\xfa'),
bytearray(b'3')
]
This array is what I read from a sensor. What I need is to uses data[3] and data[4] together (so 01 05 ) to convert this into an integer (should be 261) to get a value from the sensor. I struggle to do it. Can anyone help please?