I'm programming an arduino robot and since I want to connect two arduino boards together, I'm using i2c connection.
The master board is supposed to send a signal to the slave that has to be read once.
I don't know why but it works only when the begin and end transmission is in the loop function.. but not in the setup
You might want to try delaying a bit before sending the signal in setup. If you are powering on the master and slave at the same time, the slave may need a bit more time to get through its own setup before being ready to receive I2C signals.