Skip to content
Demo code for connecting the Raspberry Pi and the Melexis MLX90620 16x4 thermopile array.
Branch: master
Clone or download
alphacharlie Update mlxd.c
Add check for TA being out of bounds and reinitialize in that case. (Only happens on first start...)
Latest commit 2b37080 May 6, 2015
Type Name Latest commit message Commit time
Failed to load latest commit information.
COPYING support files Apr 24, 2015
Makefile support files Apr 24, 2015 i spell poorly. Apr 24, 2015
config.h support files Apr 24, 2015
getopt.c support files Apr 24, 2015
getopt.h support files Apr 24, 2015
mlxd.c Update mlxd.c May 6, 2015 code cleanup and spelling fixes Apr 24, 2015
system.h support files Apr 24, 2015


A simple demonstration daemon for the MLX90620/90621 temperature sensors. Based upon the PIIR application by Mike Strean.


Requires Mike McCauley's BCM2835 library. To build, Unzip and run 'make'. The Python demo requires numpy, skimage, cv2 and some other stuff. See the demo 'import' lines for details.


Run mlxd as root. It will create the file /var/run/mlxd.sock. This FIFO conatins a buffer of the temperature data as an unsigned short int in hundredths of a degree Kelvin. To use it read the FIFO and consume in 128 byte chunks. See for an example.

To test run the script. (Requires the usual math/imaging libraries, cv2, skimage, numpy, etc.)


This code is a demo for educational purposes. Bugs can be reported to


0.1.0 - Initial release


The daemon portion of this demo is based upon the PIIR application by Mike Strean -

The routine used to align the IR image comes from Dr. Neil Yager's excellent article on disguise detection -

Also, as a programmer I stand on the shoulders of all those who came before me just as my code sits on top of the libraries they wrote. Thousands of people whose names I will never know helped write this... ;-)

You can’t perform that action at this time.