adafruit / Adafruit-MLX90614-Library

Arduino library for the MLX90614 sensors in the Adafruit shop
Other
128 stars 97 forks source link

Add functions to read raw IR channels 1 and 2 #47

Open rafael-ottersberg opened 8 months ago

rafael-ottersberg commented 8 months ago

Implements a function that reads the raw values from RAM and converts it, following the "sign-magnitude representation" according to the sensor's manual.

Solves issue #46.

rafael-ottersberg commented 8 months ago

0 is returned if the write_then_read() fails which comes from the read16() function. However, UINT16_MAX for read16() and INT16_MAX for readSignMag16() would be better than 0, as 0 is a valid value that could be encountered.

Is anything missing?