MLX90640 infrared (IR) sensor array
Connection
Much like the AMG8833 the MLX90640 just needs a minimal
Unfortunately reading the pixel data from the MLX90640-ESF-BAA (110°C) or MLX90640-ESF-BAB (55°C) is a lot more complex than the AMG8833.
Using a Library, or not.

There are libraries that (seem) to correctly implement the complex calculations necessary to read and accurately calculate the data for the MLX90640, none of them are easy to use (or just integrate) with ESP-IDF, I tested on a PiZero and got an indication it might not necessary to run the complex calculations that are beyond my immediate understanding.
Not using a library
Ok, lets just read the data.
Setup
There is a Control Regsiter at 0x800d described on page 17, I write mostly the defaults to it:
000 - reserved
1 - Chess Pattern
10 - 18 bit resolution
011 - 4Hz refresh (or a complete refresh twice a second)
000 - Subpage 0
0 - transfer data on each frame
0 - reserved
1 - Subpage mode
Once the set up is done, it's an infinite loop to read the data and xmit the raw data to a TCP socket.
Read some parameters
Ta_Vbe and Ta_PTAT. Ta_Vbe (ambient temperature compensation value) is used to calculate an "average" temperature to use as a "black" pixel... The average isn't calibrated and it doesn't match the real average, but per tests below it works as a point from which to calculate whether a pixel is warmer or cooler.
Wait for dataReady
Wait until Status Register bit 4 (0x08) is true
Read RAM
0x0400 - 0x06FF (768 pixel data)
0x0700 - 0x073f (extra stuff that is very important, but can actually be discarded)
Do some calculations
Calibrating

I pointed the sensor at a constant temperature source and read the pixel data. Assuming (reasonably) that they should all be the same I created a "calibration array" that stores an offset for each pixel to be used in the calcuations.
The animation at right shows the raw data compared to what it looks like using just the simple offset.
This solution produces data that is useable for human detection with much simpler software.
