adafruit / Adafruit_APDS9960

Arduino drivers for APDS9960 gesture sensor
Other
37 stars 45 forks source link

The Color Data returned is formatted incorrectly (i think) #5

Closed mrmcwethy closed 6 years ago

mrmcwethy commented 6 years ago

getColorData() calls read16() which formats the device returned as a 16 bit integer.

return (ret[0] << 8) | ret[1];

The first byte is format as the High byte and the 2nd as the Low byte. The documentation for the device is the exact opposite.

ladyada commented 6 years ago

woops, could be! @deanm1278 take a look when ya get back?

deanm1278 commented 6 years ago

@mrmcwethy you're right, this has been fixed: https://github.com/adafruit/Adafruit_APDS9960/commit/4f0ca584f88b7a75a1c08042569214f9cb6b7786 Thanks!