All Projects → hepingood → mlx90614

hepingood / mlx90614

Licence: MIT License
mlx90614 full function driver

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to mlx90614

max30205
max30205 full function driver
Stars: ✭ 18 (+5.88%)
Mutual labels:  thermometer, mcu, iic, full-function-driver
fm24clxx
fm24clxx full function driver
Stars: ✭ 0 (-100%)
Mutual labels:  mcu, iic, full-function-driver
mcp9600
mcp9600 full function driver
Stars: ✭ 22 (+29.41%)
Mutual labels:  mcu, iic, full-function-driver
bmp388
bmp388 full function driver
Stars: ✭ 14 (-17.65%)
Mutual labels:  mcu, iic, full-function-driver
bmp180
bmp180 full function driver
Stars: ✭ 57 (+235.29%)
Mutual labels:  mcu, iic, full-function-driver
amg8833
amg8833 full function driver
Stars: ✭ 78 (+358.82%)
Mutual labels:  thermometer, mcu, infra-red
pcf8591
pcf8591 full function driver
Stars: ✭ 32 (+88.24%)
Mutual labels:  mcu, iic, full-function-driver
adxl345
ADXL345 full function driver for general MCU and Linux.
Stars: ✭ 170 (+900%)
Mutual labels:  mcu, iic, full-function-driver
ina219
ina219 full function driver
Stars: ✭ 27 (+58.82%)
Mutual labels:  mcu, iic, full-function-driver
sgp30
sgp30 full function driver
Stars: ✭ 24 (+41.18%)
Mutual labels:  mcu, iic, full-function-driver
uvis25
uvis25 full function driver
Stars: ✭ 13 (-23.53%)
Mutual labels:  mcu, iic, full-function-driver
mcp4725
mcp4725 full function driver
Stars: ✭ 15 (-11.76%)
Mutual labels:  mcu, iic, full-function-driver
at24cxx
at24cxx full function driver
Stars: ✭ 28 (+64.71%)
Mutual labels:  mcu, iic, full-function-driver
sht31
sht31 full function driver
Stars: ✭ 28 (+64.71%)
Mutual labels:  mcu, iic, full-function-driver
hx711
HX711 full function driver for general MCU and Linux.
Stars: ✭ 67 (+294.12%)
Mutual labels:  mcu, full-function-driver
hcsr04
hcsr04 full function driver
Stars: ✭ 25 (+47.06%)
Mutual labels:  mcu, full-function-driver
max30102
max30102 full function driver
Stars: ✭ 88 (+417.65%)
Mutual labels:  mcu, iic
max7219
MAX7219 full function driver for general MCU and Linux.
Stars: ✭ 86 (+405.88%)
Mutual labels:  mcu, full-function-driver
ssd1351
ssd1351 full function driver
Stars: ✭ 34 (+100%)
Mutual labels:  mcu, full-function-driver
pcf8574
pcf8574 full function driver
Stars: ✭ 106 (+523.53%)
Mutual labels:  mcu, iic

English | 简体中文 | 繁體中文 | 日本語 | Deutsch | 한국어

LibDriver MLX90614

MISRA API License

The MLX90614 is an Infra Red thermometer for noncontact temperature measurements. Both the IR sensitive thermopile detector chip and the signal conditioning ASSP are integrated in the same TO-39 can.Thanks to its low noise amplifier, 17-bit ADC and powerful DSP unit, a high accuracy and resolution of the thermometer is achieved.The thermometer comes factory calibrated with a digital PWM and SMBus (System Management Bus) output.As a standard, the 10-bit PWM is configured to continuously transmit the measured temperature in range of -20…120˚C, with an output resolution of 0.14˚C.The factory default POR setting is SMBus.

LibDriver MLX90614 is the full function driver of MLX90614 launched by LibDriver. It provides temperature reading, id reading and other functions. LibDriver is MISRA compliant.

Table of Contents

Instruction

/src includes LibDriver MLX90614 source files.

/interface includes LibDriver MLX90614 IIC platform independent template。

/test includes LibDriver MLX90614 driver test code and this code can test the chip necessary function simply。

/example includes LibDriver MLX90614 sample code.

/doc includes LibDriver MLX90614 offline document.

/datasheet includes MLX90614 datasheet。

/project includes the common Linux and MCU development board sample code. All projects use the shell script to debug the driver and the detail instruction can be found in each project's README.md.

Install

Reference /interface IIC platform independent template and finish your platform IIC driver.

Add /src, /interface and /example to your project.

Usage

example basic

uint8_t res;
uint32_t i;
float ambient;
float object;

/* init */
res = mlx90614_basic_init();
if (res != 0)
{
    return 1;
}

...
    
for (i = 0; i < 3; i++)
{
    res = mlx90614_basic_read((float *)&ambient, (float *)&object);
    if (res != 0)
    {
        (void)mlx90614_basic_deinit();

        return 1;
    }

    /* print the data */
    mlx90614_interface_debug_print("mlx90614: %d/%d.\n", i + 1, 3);
    mlx90614_interface_debug_print("mlx90614: ambient is %0.2fC object is %0.2fC.\n", ambient, object);

    /* delay 1000 ms */
    mlx90614_interface_delay_ms(1000);
    
    ...
        
}

...
    
(void)mlx90614_basic_deinit();

return 0;

example advance

uint8_t res;
uint32_t i;
float ambient;
float object;

/* init */
res = mlx90614_advance_init();
if (res != 0)
{
    return 1;
}

/* exit sleep */
res = mlx90614_advance_exit_sleep();
if (res != 0)
{
    (void)mlx90614_advance_deinit();

    return 1;
}

...
    
/* delay 2000 ms */
mlx90614_interface_delay_ms(2000);

/* read id */
res = mlx90614_advance_get_id((uint16_t *)id);
if (res != 0)
{
    (void)mlx90614_advance_deinit();

    return 1;
}

mlx90614_interface_debug_print("mlx90614: get id is 0x%02X 0x%02X 0x%02X 0x%02X.\n", id[0], id[1], id[2], id[3]);

...
    
for (i = 0; i < 3; i++)
{
    res = mlx90614_advance_read((float *)&ambient, (float *)&object);
    if (res != 0)
    {
        (void)mlx90614_advance_deinit();

        return 1;
    }

    /* print the data */
    mlx90614_interface_debug_print("mlx90614: %d/%d.\n", i + 1, 3);
    mlx90614_interface_debug_print("mlx90614: ambient is %0.2fC object is %0.2fC.\n", ambient, object);

    /* delay 1000 ms */
    mlx90614_interface_delay_ms(1000);
    
    ...
}

/* enter sleep */
res = mlx90614_advance_enter_sleep();
if (res != 0)
{
    (void)mlx90614_advance_deinit();

    return 1;
}

...
    
(void)mlx90614_advance_deinit();

return 0;

Document

Online documents: https://www.libdriver.com/docs/mlx90614/index.html

Offline documents: /doc/html/index.html

Contributing

Please sent an e-mail to [email protected]

License

Copyright (c) 2015 - present LibDriver All rights reserved

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy

of this software and associated documentation files (the "Software"), to deal

in the Software without restriction, including without limitation the rights

to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

copies of the Software, and to permit persons to whom the Software is

furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all

copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER

LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,

OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE

SOFTWARE.

Contact Us

Please sent an e-mail to [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].