I am using and Aruino Uno Wifi with a Grove Base Shield. The temp sensor and relays are connected over I2C. Both work separately but not together.
If I combine the relay and temperature code; the relay will work, but the temperature will not. If I disconnect the relay I2C line, then the temp sensor works.
Both are using I2C default addresses which do not appear to conflict (0x11 for the temp and 0x45) for the relay.
Both sensors say they can take the 5V the Arduino supplies.
I2C devices do have compatibility problems between different devices, but these problems are unpredictable.If this is a problem, I recommend connecting to a different I2C bus.
It looks like the problem is not necessarily with either peripheral but with the lead itself. If I use the short Grove leads then everything works. If I attached a longer Grove lead to the Base Shield - whether or not that lead is in turn connected to a device - the I2C signal fails. I presume this is due to the longer lead adding something (capacitance?) to the signal line. If so this suggests that the humidity sensor is more fussy about the quality of the I2C signal than the relay.
I have now connected 5 I2C devices to the bus and all work as expected except the Grove humidity sensor. I can’t see anything in the datasheet to suggest why this might be. Any ideas?