Hey everyone, im new on the arduino world so im learning a lot on the past months.
But i run into some troubles, i need to use for my project 8 MLX90614, which are IR temperature sensors, but i know that i2c cannot have the same address.
So i bought a CD74HC, a 16 channel multiplexer, but i cannot make them work, i believe because of my code.
I hardwire the SCL from the components, and connect the SDA trough the mux.
I already tested the mux and the MLX separated, and they both work.
Im using libraries for both components.
Here is my code:
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
MUX74HC4067 mux(2, 3, 4, 5, 6); // 2 is the common, and 2-6 is the s0-s3 from mux
mux.signalPin(20, INPUT, DIGITAL); //20 is the sda from the arduino mega im using
for (byte i = 0; i < 16; ++i)
Serial.print(“Ambient = “); Serial.print(mlx.readAmbientTempC());
Serial.print(”*C\tObject = “); Serial.print(mlx.readObjectTempC()); Serial.println(”*C”);