Hello I can't not find what is the maximum length between 2 arduinos using spi vs i2c vs rx,tx ?? Does anyone know how i can find this out?
A few meters at best for SPI and I2C, but it depends strongly on speed.
For TTL level RS232 serial, hundreds of meters at low transmission speed.
For RS485, much further, but you need custom line driver ICs.
Read the specifications for the different protocols. They will often specify things like "maximum bus capacitance". Then read the specifications for your cable to find the capacitance-per-foot.
You would think that there's some simple rules of thumb, like Ethernet has a pretty strict 100m limit. But there aren't. Your application is different from everyone else's, so they can't tell you what your limit is.
Personally, I've had trouble with I2C longer than 10cm. I've had SPI work well at 3m. I've got longer cables running TTL serial and RS232 serial. More than that, say up to 200m, the cost of a wireless transmitter and reciever is less than the cost of the cable. More than that, line-of-sight is a problem (the Earth is round) so an internet-based solution is good.
Hello thank you for the information i was trying i2c at 9600 i got 12 ft and seem to be okay i also did a 25 ft length and seems to be okay as well. But when i did a 50ft wire it seems to loose a little packets or something. i did from arduino to arduino with a hello world sending every second. It skeeps a few times. But never did spi or serial rx tx. so i wasn’t sure.