iIf powering the Arduinos independently is an issue, connect the 5V output of the Master Arduino to the VIN pin on the slave.
But I also read the code example in the link provided, and I don't see where the master Arduino set the speed. If in the line:
It is setting it by default to 100Mhz. See this post for how to change that http://arduino.cc/forum/index.php/topic,16793.0.html
Okay, so the Wire.begin(); sets the clock speed. But both Arduinos have a command in their code called Wire.begin(). So whos becomes the master?
The one that starts talking. There isn't any hardware difference. If you speak without being spoken to, you're the master. You can have multiple masters. The slave is merely any device that has been addressed by a/the master. This is why the master doesn't have to assign itself an address. If no one is going to direct communication at you (except in reply), there's no real need for an address.Contention on i2c is resolved by holding the clock. If you read the data bus after transmitting your data and the line is not high, it's because someone else caused a collision. These are resolved by the bit pattern. The one holding the line low the longest wins.SPI is different. Electrically, there is a master and one or more slaves. This determines which pin is set as an output and which is an input, and how you deal with slave select -- either listening for it or toggling digital output pins to select other ICs.
Yep! I find many tutorials to be great at explaining how to accomplish a simple task, but not so great at explaining how it's actually done under the hood.
It is setting it by default to 100Mhz.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16