I2C Slave Library (Atmega328 based Arduino)

Hi,

I am currently working on a project where I want to use I2C Master device to continously provide data to I2C Slave Arduino Nano. Unfortunately something is wrong with Wire library because after some time, Receive callback stops being triggered.

Because of this I am looking for a good I2C Slave library as an alternative for Wire. I found a couple of them, but they are either master-only or for ATTiny.

Does anyone know any good alternative?

Thanks.

Usually this isn't a software problem but a hardware problem. Please provide a wiring diagram of your setup. How long is the cable between the two Arduinos?

If you just want to re-enable communication if the hardware fails, take a look at the hardware watchdog the ATmega328 offers.

Do you have 4.7K pullup resistors on SCL and SDA, and are the Arduino grounds connected? The wire library turns on the internal pullup resistor, but it's really feeble for an I2C pullup. If you looked at the signals you'd see a slow, dragged out rise from 0V to 5V, vs a nice crisp rising edge with the 4.7K pullup.