All wiring guides

Free wiring guides

Wire the MLX90614 infrared thermometer to the ESP32-C3

Infrared thermometer, MLX90614 (GY-906), I2C. Reads the temperature of what it points at, without touching.

Which pin goes where

On the partOn the ESP32-C3
VIN3V3
GNDGND
SCLGPIO 7
SDAGPIO 6

Wire it with the USB cable unplugged. Follow the names printed on your own part: makers sometimes reorder the pins.

In 3D

Example sketch

// Infrared thermometer, MLX90614 (GY-906), I2C
// on the ESP32-C3 Super Mini
// https://stem.manusignal.com/en/parts/mlx90614-gy-906-esp32-c3
#include <Wire.h>
#include <Adafruit_MLX90614.h>

const int PIN_SDA = 6;
const int PIN_SCL = 7;

Adafruit_MLX90614 mlx;

void setup() {
  Serial.begin(115200);
  Wire.begin(PIN_SDA, PIN_SCL);
  if (!mlx.begin(MLX90614_I2CADDR, &Wire)) Serial.println("MLX90614 not found");
}

void loop() {
  Serial.print(mlx.readObjectTempC(), 1);
  Serial.println(" C");
  delay(500);
}
  • Tools > Board > ESP32C3 Dev Module (USB CDC On Boot: Enabled), then Tools > Port and choose the board's port.
  • Adafruit MLX90614 Library: install it from Sketch > Include Library > Manage Libraries.

This sketch is compiled for the board before the page is published. It has not been run on real hardware by us.

What you should see

Open the Serial Monitor at 115200. The temperature rises when you hold your hand in front of the sensor.

If it does not work

The reading is much too low.
The sensor sees a wide cone. Bring it within 2 cm of the cup so the cup fills its view.

The same part on the ESP32-S3

Build something with it

These Build Packs use this part on this board, with the same pins.

More parts on the ESP32-C3