Hi !
I've connected 3 arduinos nano slaves to one arduino Mega master via I2C
using library EasyTransfer GitHub - madsci1016/Arduino-EasyTransfer: An Easy way to Transfer data between Arduinos
I works fine with the example code : Master writes to one slave or the other.
 //send the data
ET.sendData(I2C_SLAVE#1_ADDRESS);
//and
ET.sendData(I2C_SLAVE#2_ADDRESS);
//and
ET.sendData(I2C_SLAVE#3_ADDRESS);
Reading the excellent explanations from Nick Gammon http://www.gammon.com.au I2C - Two-Wire Peripheral Interface - for Arduino
I tried to broadcast to all slaves at the same time
// Written by Nick Gammon
// February 2011
#include <Wire.h>
Wire.beginTransmission (0);Â // broadcast to all
the code in the EasyTransfer library is the following
//Sends out struct in binary, with header, length info and checksum
void EasyTransferI2C::sendData(uint8_t i2c_address){
_serial->beginTransmission(i2c_address);
so EasyTransfer.sendData(0); should work
I tried it: it's compiling fine, but the slaves do not received anything...
Can someone enlights me please?