Are you new to using Arduino? No worries, you can get started using our series of guides on
Getting Started with Arduino.
You can learn more about Arduino libraries by reading this guide from Adafruit.
Follow your board's guide on installing Arduino IDE, and support for the board you have. Then install the Adafruit Arcada libraries (there's a lot of them!).
Once done, install the Adafruit_MLX90640 library.
Test the Circuit
Included with the library are two example sketches which can confirm that the sensor is functioning. MLX90640_simpletest is like a Hello World for your circuit. Compile it in your Arduino IDE, upload it, run it, and it should begin sending serial text that you can view in the serial console.
After sending the status of some of the sensor's hardware settings, the sketch goes on to serial print ASCII art images of the temperature pattern sensed by the MLX90640.
Look for this pair of lines near the head of the sketch.
By changing which one of the two is uncommented, the ASCII art output will be replaced by arrays of numeric values.
The other example sketch, MLX90640_arcadacam, presents the array of temperatures as a color image on the TFT screen. Have a look around at your fascinating thermal world!
One other important detail needs attention before proceeding. If, like me, your images will be captured to built-in flash memory, like that on a PyBadge, look to the Arduino window menu bar. Choose this setting, Tools > USB Stack > TinyUSB. It's an essential step in giving your computer access to QSPI flash storage as a virtual USB external drive. It's a handy way to read the images you'll capture.
The other settings in the list? I leave them at their standard values. You may want to change them for higher performance, whatever you prefer.
Congratulations! Your hardware is ready for the next step, the full camera sketch.