MLX90614 works with Uno but not UNO WifI Rev 2?

I'm pretty new to arduino so I'm not sure what is going on. I bought an MLX90614 IR temperature sensor, and I loaded the code from here: GitHub - adafruit/Adafruit-MLX90614-Library: Arduino library for the MLX90614 sensors in the Adafruit shop

It is connected to the SCL and SDA lines. If I use the Arduino Uno it works perfectly with the example code.
If I use a Arduino Uno WiFi rev 2 board, it doesn't work. It outputs values around 1000C and they do not change. If I unplug the SCL and SDA lines it is exactly the same. So, it would appear that the WiFi board is not using the SLC and SDA lines.

Any ideas?
Thanks, Tom

Are there pullup resistors on the SDA and SCL pins?

Hi, no. They are not needed with the UNO . Are they needed with the WiFi rev 2?
If I run the I2C scanner sketch it does find the device.
But the data is garbage.

Check the WiFi rev 2 schematic to see if they are installed. You can always add two (4.7K) without damaging the system.

Checking the schematic shows they are NOT installed.
I'll wire this up and let you know.

Just tried it now with the pull ups and it makes no difference. Still does not read the MLX properly. It does detect the device.

It is connected to the SCL and SDA lines.

So not to A4,A5.

If you post according to the forum guidelines, then we won't have so many questions.

I am pretty new here, but what is missing? I did read these guidelines.
Yes it is connected to SLC and SDA.

If I run the I2C scanner sketch it does find the device.

At the correct I2C address?

If so, try some simple code to just read a register with known content, like one of the ID registers.

Edit: The Uno Wifi Rev 2 uses a different processor than the Uno, with a bunch of extra circuitry and the Adafruit library may not be compatible.

OK, works on Uno rev 3 but not the rev 2 wifi board. Here is what I would try. Run the following code sample on both boards:

  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 <Wire.h>
#include <Adafruit_MLX90614.h>

Adafruit_MLX90614 mlx = Adafruit_MLX90614();

void setup() {

  Serial.println("Adafruit MLX90614 test");  


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");


Now if that sample runs fine on both then we know the library is written for both and the problem is elsewhere.

This is inline with jremington’s above post as you have to start somewhere.


That is the exact code I am running with both of the boards.
Works only on the UNO.