Skip to content

A C library for the MLX90614 IR Sensor on Raspberry Pi

License

Notifications You must be signed in to change notification settings

rmullin7286/MLX90614

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MLX90614

A C library for the MLX90614 IR Sensor on Raspberry Pi

IMPORTANT NOTE!!!

Make sure you always run applications that use this library as root. The bcm2835 library requires that the application be run as root or it will cause a segmentation fault.

Installation

Simply run the following commands in the root folder and the library will be installed:

make
sudo make install

That's all there is to it!

How to use

This is a simple library and contains only 6 functions in total, all located in the header file 'MLX90614.h'. Each function takes the address of the MLX90614 device as an argument and returns a float value for the temperature specified. The address is 0x5a by default, which is defined in the library as 'MLX90614_I2CADDRESS'.

The six functions to retrieve temperatures are as follows:

MLX90614_ReadAmbientF()
MLX90614_ReadAmbientC()
MLX90614_ReadAmbientK()

MLX90614_ReadObjectF()
MLX90614_ReadObjectC()
MLX90614_ReadObjectK()

With F, C and K denoting Farenheit, Celsius and Kelvin scales respectively.

Compiling

Compiling an application with the library is simple. Simply append '-lmlx90614' to the end of your gcc arguments to use the library. Ex:

gcc main.cpp -lmlx90614

About

A C library for the MLX90614 IR Sensor on Raspberry Pi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published