MLX90614 on Wio Terminal temperature sensor (no I2C library included?)


I am trying to read temperature datas from a MLX90614 sensor connected to a Wio Terminal. I have managed to run the mlxtest from Adafruit MLX90614 library on an Arduino Nano 33 BLE Sense (just had to be careful to connect Vdd to Vin and not V33).

However it doesn't work on my Wio Terminal. I have noticed that there is no Wire library included in this exemple. Isn't it weird? (I also tried to include this library but it didn't fix the problem)


Does that mean you have 5V version of the sensor? Please post the complete product code!

I'm also missing a wiringi diagram of your setup! That includes the schematics of a breakout board if you use one for the MLX!

If you mean the mlxtest example, the Wire library is included within the library (as it should be).

Hello, thanks for the answer

No I think I have the 3V version.

Ok now it is working even on 3V3 I think I did a mistake on the wiring.

I don't have a wiring diagram but here is then the connection possible on Arduino Nano BLE

Vdd=Vin or 3V3

On the Wio Terminal,

Ok thank you for the information, I didn't think about checking inside it !

How do you power the Nano 33 BLE? By USB? Vin is connected to VUSB, so it has 5V which might fry the sensor linked to above.

I2C0 is on 27/28, on 3/5 is I2C1. If you want to use that one you have to specify that explicitly!

I didn't have any problem with other sensor (such as MAX30100 on pin 3/5 but I will try also on 27/28. I couldn't find how to specify it, do you know that ? Thanks in advance!
(I won't be able to try anything next week but I will try the week after)

You can provide the used Wire object in the begin method of the Adafruit_MLX90614 library.

I followed the rather complex numbering in the SAMD51 variant Seeed created for the WIO Terminal and it seems that they call I2C0 Wire1 and I2C1 Wire, so you're probably right with 3/5.

In the pinout on Seeed's wiki page pin 17 is 3V3 but in the diagram in the variant.h file of that board pin 17 is GND. You should check that using a multimeter and maybe change Vdd to pin 1 which is 3V3 in both documents.

1 Like

I am really sorry but I don't understand how to do that?

About the Vdd=17 I have tried with the MAX30102, it works either on Vdd=17 or 1


mlx.begin(MLX90614_I2CADDR, &Wire);


mlx.begin(MLX90614_I2CADDR, &Wire1);

1 Like

I have tested that on Adafruit_MLX90614's example but it didn't work... Which library have you been using?

  This is a library example for the MLX90614 Temp Sensor

  Designed specifically to work with the MLX90614 sensors in the
  adafruit shop
  ----> 3V version
  ----> 5V version

  These sensors use I2C to communicate, 2 pins are required to
  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.
  BSD license, all text above must be included in any redistribution

#include <Adafruit_MLX90614.h>

Adafruit_MLX90614 mlx = Adafruit_MLX90614();

void setup() {
  while (!Serial);

  mlx.begin(MLX90614_I2CADDR, &Wire1);
  Serial.println("Adafruit MLX90614 test");

  if (!mlx.begin()) {
    Serial.println("Error connecting to MLX sensor. Check wiring.");
    while (1);

  Serial.print("Emissivity = "); Serial.println(mlx.readEmissivity());

void loop() {
  Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempC());
  Serial.print("*C\tObject = "); Serial.print(mlx.readObjectTempC()); Serial.println("*C");
  Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempF());
  Serial.print("*F\tObject = "); Serial.print(mlx.readObjectTempF()); Serial.println("*F");


Here is the source code of the begin function:

bool Adafruit_MLX90614::begin(uint8_t addr, TwoWire *wire) {
  _addr = addr; // needed for CRC
  if (i2c_dev)
    delete i2c_dev;
  i2c_dev = new Adafruit_I2CDevice(addr, wire);
  return i2c_dev->begin();

What does that mean? Does it not compile? Does it not return any result? What serial output do you get?

None, I don't have your hardware.

I know that, that's why I suggested you the two lines of code above.

Sorry I didn't precise, I just get the message corresponding to the beginning of the setup loop

10:51:20.111 -> Adafruit MLX90614 test

What is the output if you use Wire instead of Wire1?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.