I want to convert data from a device from bites to float I use the code from this answer
import struct
byte_file = b'+001.80\r'
print(type(byte_file))
y = struct.unpack('f' , byte_file)
print(y)
I get this struct.error: unpack requires a buffer of 4 bytes
The correct outcome should be 1.80
do I need to implement a buffer argument ?