SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By kirash4
#153321
I wonder if there's a better way to communicate with several slaves at the same time (or as close as possible, accounting for additional clocks within a loop). Right now, I'm doing something like this:
Code: Select all
for (int slave = 1; slave <= 10; slave++) {
  Wire.beginTransmission(slave);
  Wire.write(data);
  Wire.endTransmission();
}
I don't expect (nor require) anything to be read back from the slaves, I'm just sending data to them. Not sure if that makes any difference. But it does make me wonder: if all I'm doing is sending data out, can I set all the slaves to the same address? They're not sending anything back to the master anyway. That would get rid of the above loop at least ...
By Blackfin
#153324
I don't think so since the I2C protocol uses ACKs from the slaves back to the master. Wouldn't be prudent to have them all doing it at the same time.