Unfortunately theres still something not working at my project. If I run my programm everything works fine, but after some time the arduino just stops working/freezes.(arduino lights still on) The programm just gets stuck at some point. If I press the reset button at the arduino the program starts again but gets stuck again. The points when it stops working are mostly different. I've tried waiting for about 10 minutes but nothing happened. I used different codes to find the problem but it gets stuck always at some point.
The only thing missing from that diagram now is the ... missing 4K7 resistors pulling up the I2C lines.
as far as I understood, I need 2 4k7 ohm resistors at the beginning of the SDA and SCL line
Right. The resistors can be fitted anywhere, from the signal line to +5V, the position doesn't matter.
I put one on the SCL and one on the SDA line at the beginning (between A4, the sda port of the aduino and the sda port of the first chip, same goes for A5 and scl)
My problem is solved. Thank you all for helping me soo much. Jakub