Closed LEBsci closed 3 years ago
If I upload the same sketch to other Arduino boards and connect just the SDA and SCL pins to the sensor, it works
I2C on the Due in general is known to be not so great. Can you just use one of the other boards that works?
Try the 2.0.0 release and see if it helps. Maybe the BusIO usage will fix this also? https://github.com/adafruit/Adafruit-MLX90614-Library/releases/tag/2.0.0
Thank you @caternuson. I just tested the new release and sadly it still doesn't work. I was asked to use this board since there is a possibility that we will need the faster processor. We are still in early tests so I can not say for sure, but maybe the other boards I have (Mega and UNO) will not be fast enough for the project. That's why I was hoping to find a fix for this.
FWIW - there are numerous more modern 32 bit ARM based Arduino boards that are faster than the due and have better I2C implementations.
yeah the due has bad i2c implentation. we really recommend you go to a Zero or something
Arduino board: Arduino Due
Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.13
List the steps to reproduce the problem below (if possible attach a sketch or copy the sketch code in too):
include
include
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); }
Adafruit MLX90614 test
Ambient = 1037.55C Object = 1037.55C Ambient = 1899.59F Object = 1899.59F