Control MLX90614

日本語のページ

You can control the MLX90614, a sensor for measuring body and ambient temperatures.
Blocks related to the MLX90614 can be found in the "Sensor" - "Human Body" - "MLX90614" group.
Note, however, that it does not work with the Arduino UNO Q.

Wiring

Connect the MLX90614 module to the microcontroller using I2C.
The pin numbers used for the I2C connection vary depending on the microcontroller.
For details, please refer to the "I2C Connection" page.

For example, with a standard ESP32, connect SDA to pin 21 and SCL to pin 22.

MLX90614 wiring

Initialization

For microcontrollers with fixed I2C pin numbers, such as the standard ESP32, use the "Initialize MLX90614" block.

Initialize the MLX90614

For microcontrollers with configurable I2C pin numbers, such as the ESP32-S3, use the block that allows you to specify the pin numbers during initialization.

Initialize the MLX90614 by specifying the I2C pin number.

Retrieving Body Temperature and Ambient Temperature

After initialization, you can use blocks to retrieve the body temperature and ambient temperature.
You can assign the values ​​obtained from these blocks to variables or output them to the screen.

Get body temperature

Get ambient temperature

Retrieving Body Temperature and Ambient Temperature Together

You can also retrieve both the body temperature and ambient temperature at once.

Get body temperature and ambient temperature at the same time.

Assign the values ​​retrieved together to a variable.

Get body temperature and ambient temperature together and assign them to variables.

Then, extract the object temperature and ambient temperature individually from the assigned variables to use them.

Body temperature obtained in bulk

Ambient temperature obtained in bulk

Example

The following example demonstrates how to read the object temperature and ambient temperature from the MLX90614 every second and output them to the web browser's console.
You can download this program here.

Example of retrieving and displaying body temperature and ambient temperature from the MLX90614.