soend wrote:Im making a little project where i need to communicate with arduino board and need to decide what im going to use for it. What are benefits for one and another?
I actually have serial connection working between two of them and with baudrate 9600 i measured that for doing one "transaction" between 2 boards takes ~1 second (Sending 18 bytes to arduino and receiving 18 back form it). And this made me think if using i2c would be faster (or even SPI?). In my case i would like the "transaction" to take less than second (half a second would be perfect).
I've been communicating to Arduinos/ATmegas via both the on-board serial and USB at 115200 baud.
If your transaction is taking that long to exchange 18 bytes then there is something very wrong. 9600 baud is approximately 1000 characters/sec. so I'd look to see where your delays are before blaming the transport technology you're using.
E.g. this setup which I did waaay back:
has a BASIC program running in the Pi talking via usb serial to an arduino running a very simple remote control program and it's updating the display based on the little potentiometer on the arduino, outputting LEDs and reading the switches - and the cycle time in the BASIC program is over 100 cycles/sec...