Arduino with more i2c

Hi, i want to use to library that use the analog pin 4 and 5 but the thing is that one is for the lcd and the second is for the ds1307. I want to keep the pin 0 and 1 for the serial communication. do you guy have some tips.


i2C is a BUS. This bus uses A4(SDA pin and A5(SCLK).Your ds1307 also have those e pins and they are shared with your LCD(if it also use I2C off course) All you need to do is put pull-up resistors on both lines and connect LCD and ds1307 in the bus. Every device as an ID so be sure ds1307 as a different ID from the LCD.

The slave address byte contains the 7-bit DS1307 address, which is 1101000

Your LCD should have an address also, some of then you could choose the address or it is already defined.