I am a newbie trying to interface the infrared temperature sensor MLX90614 with the arduino Due. But it keeps sending out junk values in the serial monitor. I've tried it out on the Arduino Mega and it works perfectly. What might be the problem and how do I rectify it? Thanks in advance.

#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");
  • Please include your code into your question – chrisl Feb 11 '20 at 9:14
  • How do you wire the MLX90614 with the board? What MLX90614 interface/shield you are using? One thing that I could think of is that Arduino Mega is a 5V development board, while Arduino Due is a 3.3v development board. – hcheung Feb 11 '20 at 9:47
  • @chrisl the code is the same example in the library to check the working of the sensor. – Tejus Vivek Feb 11 '20 at 10:31
  • hcheung .. no, i am not using any shield for this.. – Tejus Vivek Feb 11 '20 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.