Used lang is Python.
I am trying to decode the color sensor data from the Thingy52 to RGBA.
To interface with the Thingy52 I use the thingy52.py example in https://github.com/IanHarvey/bluepy/tree/master/bluepy
Four examples of the received raw data:
b'\xd4\x05\xad\x05\xae\x00\xf9\x00'
b'f\r\x8e\x11B\n\xa5\x03'
b'\x8a\r\xad\x11K\n\xa8\x03'
b'Y\rw\x11/\n\xa1\x03'
This data can somehow always be decoded to 16 Bytes with binascii.b2a_hex()
.
Example: b'5d06a90677013201'
This could be 4 4-byte-floats or 4 int32 / uint32, but every attempt at unpacking this as a struct with the struct
standard library results in weird numbers that don't fit in the 0-255 range.
My question: How can this data be decoded?
If I have found the correct Nordic documentation, then they are 4 uint16
So in python you could do: