Hello, and thank you for your suggestions.
Sorry that I did not react earlier, but my kids got sick and I had my hands full with that for the last few days.
I have added the changes you suggested to make sure I read both sensors and also tested it with putting something hotter in front of each seperately, and it works.
How ever, the original issue for which I posted, persits, the serial monitor stops after like 30 seconds. it starts up perfectly if I switch it op and on, to again run for 30 sek or so. Any ideas what is happening there?
thank you very much!
(updated code below)
#include <Wire.h>
#include <Adafruit_MLX90614.h>
#define IR1 0x5A
#define IR2 0x5B
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
Adafruit_MLX90614 mlx2 = Adafruit_MLX90614();
void setup() {
Serial.begin(9600);
Serial.println("Adafruit MLX90614 test");
mlx.begin(IR1);
mlx2.begin(IR2);
}
float temp1 =0;
float temp2 =0;
void loop() {
Serial.print("IR1: ");
Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempC());
Serial.print("*C\tObject = "); Serial.print(mlx.readObjectTempC()); Serial.println("*C");
temp1 = mlx.readObjectTempC();
delay(500);
Serial.print("IR2: ");
Serial.print("Ambient = "); Serial.print(mlx2.readAmbientTempC());
Serial.print("*C\tObject = "); Serial.print(mlx2.readObjectTempC()); Serial.println("*C");
temp2 = mlx2.readObjectTempC();
delay(500);
}