i'm making a home automation, but for that, i've to communicate between 2 arduino boards.
I've an AtMega328p-pu on a breadboard, and a mega 2560.
The mega 2560 is the "master", it transmit data receive by i2c to usb, and the atMega328 answer when the mega 2560 is asking something.
I use 8m of telephonic cable, with 4 cables (5V, gnd, data, clock) to communicate.
All is working fine, but it freeze at random time, and i don't know why. I tried many libraries, but they all crash after 10 minutes to 4 hours.
Sometime, it's the master, sometime the slave.
I don't know what to do.
Do i have to use an other protocol to communicate ?