Partially decoded measurement packets

My officemate Justin and I have been pouring over the 80 measurement bytes.  We found some structure in it, but haven’t decoded every byte yet.  It turns out that there are 23 measurements total — 3 for RGB and 17 for the gray levls.  My guess is that it goes from 0 to 240 in increments of 16, and then 255. There are 3 verification measurements which are called differently, which is why I did not pick it up the first time.  This is what I have so far.

Overall, the data is in big-endian format, unsigned short integers.  Every third byte is usually 00 or C4, which looks like delimiters, but are actually status bytes I think.  The 80 bytes are divided into four groups.  The first group goes from bytes 0-7.  The next three groups are from 8-31, 32-55, and 56-79.  Bytes 2-3 are inversely correlated with the intensity of the detected light (higher value means darker).  The next three groups are probably color measurements, but I haven’t figured them out yet.  Bjorn Helgaas (whom I found on the net) sent me some datasheets and suggested that the sensors are TAOS TSLx257 devices, which can sense RGB colors.  Bytes 7 and 8 seem highly correlated with each other, and similarly with 32-33 and 56-57.  They look like the initial bytes of the color measurements.

Leave a Reply