i2c noob question :C

hi guys, i have connected 3 arduinos and one rtc, my question is, how do i set the master? i searched on internet but there is nothing, is the master the one with the pullup resistor? or is the one which join with no address (wire.begin():wink: i want to set the rtc module as the clock, or one specific arduino, please help

LeizaR:
hi guys, i have connected 3 arduinos and one rtc, my question is, how do i set the master? i searched on internet but there is nothing, is the master the one with the pullup resistor? or is the one which join with no address (wire.begin():wink: i want to set the rtc module as the clock, or one specific arduino, please help

I think the documentation is pretty clear here:
“address: the 7-bit slave address (optional); if not specified, join the bus as a master.”

You have a nice starting point in the example of two arduinos communicating with each other:

omg!! thank you man, somehow i misunderstood that, so how can i set the rtc as master? since it has a crystal incorporated and never run out of power, but the rtc join the network with a build-in address
thank you once again, i cant believe the “optional for masters” confused me

To get help about RTC's you should post more information about the model you are planning to use, so that people can look for the datasheet and more documentation.

I have never worked with an RTC, so I am afraid I cannot help with this doubt.

Good luck!

The RTC cannot be the master. It can only respond to requests for data.

However, it can initiate an interrupt, to signal alarms.

Jusep:
To get help about RTC's you should post more information about the model you are planning to use, so that people can look for the datasheet and more documentation.

I have never worked with an RTC, so I am afraid I cannot help with this doubt.

Good luck!

i bought everything so cheap that doesn't even have a model, since i am just prototyping...
but it look like this. i make it work using wire and RTClib tho

jremington:
The RTC cannot be the master. It can only respond to requests for data.

However, it can initiate an interrupt, to signal alarms.

i tried to google but i cant put all together, i needed that answer, short and precise xD, so if cant be master, i only have to set one of the arduinos to the clock thing, i hope setting a master will solve a lot of more problems that i got with my project :smiley:

The RTC cannot be a master, but more Arduinos can be. However, there are problems because it is more complicated situation and the libraries not solve it now. Easier would be to have only one master to serve others include to putting the time. The RTC is able to generate precise signal e.g. 1Hz to sync all.
I don't know the RTC board you have but as I see, it has DS1307 and ATtiny chip. I don't know the purpose of ATtiny but just briefly thinking, this chip could be a master also.

That is an EEPROM memory chip, not an ATTiny. Many of those Chinese RTC boards have one.

Ahh, my mistake... :-[