mlx90640 - infrared temperature measurement(MLX90640)#

Adapted Air780E/Air700E Air780EP Air601 Air101/Air103 Air105 ESP32C3 ESP32S3

Note

This page document is automatically generated by this file. If there is any error, please submit issue or help modify pr, thank you!

Constant#

constant

type

explanation

mlx90640.FPS1HZ

number

FPS1HZ

mlx90640.FPS2HZ

number

FPS2HZ

mlx90640.FPS4HZ

number

FPS4HZ

mlx90640.FPS8HZ

number

FPS8HZ

mlx90640.FPS16HZ

number

FPS16HZ

mlx90640.FPS32HZ

number

FPS32HZ

mlx90640.FPS64HZ

number

FPS64HZ

mlx90640.init(i2c_id,refresh_rate) (Note: To use this interface after 2023.5.15, the user needs to initialize the i2c interface by himself.)#

Initialize MLX90640 sensor

Parameters

Incoming Value Type

Explanation

int

i2c bus id or soft i2c object where the sensor is located, which defaults 0

int

The measurement rate of the sensor, which defaults 4Hz

Return Value

return value type

explanation

bool

Returns true on success, otherwise it returns nil or false

Examples

i2c.setup(i2cid,i2c_speed)
if mlx90640.init(0,mlx90640.FPS4HZ) then
    log.info("mlx90640", "init ok")
    sys.wait(500) -- Wait a moment
    while 1 do
        mlx90640.feed() -- Take a frame of data
        mlx90640.draw2lcd(0, 0 ,1)-- You need to initialize the LCD in advance.
        sys.wait(250) -- The default is 4HZ
    end
else
    log.info("mlx90640", "init fail")
end

mlx90640.feed()#

Take a frame of data

Parameters

None

Return Value

None

Examples

None


mlx90640.raw_data()#

Obtain the underlying bare data, floating-point matrix.

Parameters

None

Return Value

return value type

explanation

table

Floating-point data, 768 pixels corresponding to the temperature value

Examples

None


mlx90640.raw_point(index)#

Get a single point of data

Parameters

Incoming Value Type

Explanation

int

Index value(0-767)

Return Value

return value type

explanation

number

Single point temperature value

Examples

None


mlx90640.ta_temp()#

Get Case Temperature

Parameters

None

Return Value

return value type

explanation

number

Case temperature

Examples

None


mlx90640.max_temp()#

Get the highest temperature

Parameters

None

Return Value

return value type

explanation

number

Maximum temperature

number

Highest temperature position

Examples

None


mlx90640.min_temp()#

Get the lowest temperature

Parameters

None

Return Value

return value type

explanation

number

Minimum temperature

number

Minimum temperature position

Examples

None


mlx90640.average_temp()#

Get average temperature

Parameters

None

Return Value

return value type

explanation

number

average temperature

Examples

None


mlx90640.get_vdd()#

Get vdd

Parameters

None

Return Value

return value type

explanation

number

vdd

Examples

None


mlx90640.draw2lcd(x, y, fold)#

Draw lcd

Parameters

Incoming Value Type

Explanation

int

X coordinate of upper left corner

int

y coordinate of upper left corner

int

The magnification, which must be an exponential multiple of 2 (1,2,4,8,16…) defaults 1

Return Value

return value type

explanation

bool

Returns true on success, otherwise false

Examples

None