I have 12 bytes being sent over a web socket used to represent 3 float values. The other program does this:
float m_floatArray[3];
...
Serial.write((byte*) m_floatArray, 12); //12 b/c 3 floats at 4 bytes each
The data I receive in my python program looks like this:
#the data is printed from: received = ser.read(12)
received = '\xe4C\x82\xbd-\xe4-\xbe&\x00\x12\xc0'
I want to essentially do this in my python program:
x = getFirstFloat(received)
y = getSecondFloat(received)
z = getThirdFloat(received)
How can I parse my data?
sizeof(m_floatArray)instead of12.struct.unpack.