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.
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.
Tom
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
----> https://www.adafruit.com/products/1747 3V version
----> https://www.adafruit.com/products/1748 5V version
These sensors use I2C to communicate, 2 pins are required to
interface
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.begin(9600);
Serial.println("Adafruit MLX90614 test");
mlx.begin();
}
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");
Serial.println();
delay(500);
}
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.