Hey i want to use two MLX90614 Sensors with in a I2C Bus. The Problem that I have is, if I try to give the second Sensor a different address i don't get a value back. In tutorials I looked up they used the Adafruit library and had methods like AddrSet(); or something like that but when I installed the Library I didn't get to use this method. In addition for some people it just works if they write the different addresses in the initialization line like
Adafruit_MLX90614 s1 = Adafruit_MLX90614(0x5A);
Adafruit_MLX90614 s2 = Adafruit_MLX90614(0x5B);
but that doesn't work for me either. If you have any ideas how i could get the two sensors to work that would be great
I have the Arduino Mega, i the serial monitor i get
Sensor 1: 22
Sensor 2: nan
so it works for the first sensor but i don't get a number from the second sensor back.
Also a I2C scan finder the 0x5A sensor but not the 0x5B one.
I think that is the problem, he didn't. He just assumed it would work. The thing is that one of the devices must first be programmed to have the alternate address of 0x5B, before you connect the other un-programmed device. That code will only work if one of the devices have previously been set.
Thank you so much. With setting a new address it worked. I knew I hat to give one Sensor a new address but thought with just putting it in the begin function it just would work. thank you so much guys.