user1529: I am new to Raspberry Pi (just brought mine before writing this post), and I am looking to see what is the most ideal way for two way communication between an Arduino and a Raspberry Pi (USB, SPI or I2C).
The reason I am asking is because I need to build a small, semi-autonomous robot and plan on using both the Arduino and Pi to control it, using the pins of the Arduino for the motor control and sensors and the Pi for video processing and autonomous part. Both will be on the robot itself. I am pretty good with the Arduino but never used a Raspberry Pi before. 
So my biggest question is what would be the best form of communication for the two boards taking into account speed and safety (there is a voltage difference between the Pi and the Arduino).

user220: Hands down, I can rule out the I2C. This post sums it all up:


SPI is faster.
I2C is more complex and not as easy to use if your microcontroller doesn't have an I2C   controller.
I2C only requires 2 lines.


Since speed is your first priority, either do USB or SPI. I'd personally go with USB, just for the reason that it's simple. Nearly any programming language can inference with COM ports, but that's not the case with SPI. Also, for SPI, you would have to either use a level shifter, or do a voltage divider for the Arduino to RPi wires (for RPi to Arduino wires, Arduino can still sense 3.3V as HIGH.)
Also, serial can be pretty fast. Technically, the Arduino can go up to 2 Mbps (not very fast compared to a lot of things, but fast enough for what the Arduino can even handle). One thing to note, the writer of the post stated that this is the highest you can practically achieve with the poorly optimized libraries:
Serial.begin(500000);


1529: <p>I am new to Raspberry Pi (just brought mine before writing this post), and I am looking to see what is the most ideal way for two way communication between an Arduino and a Raspberry Pi (USB, SPI or I2C).</p>

<p>The reason I am asking is because I need to build a small, semi-autonomous robot and plan on using both the Arduino and Pi to control it, using the pins of the Arduino for the motor control and sensors and the Pi for video processing and autonomous part. Both will be on the robot itself. I am pretty good with the Arduino but never used a Raspberry Pi before. </p>

<p>So my biggest question is what would be the best form of communication for the two boards taking into account speed and safety (there is a voltage difference between the Pi and the Arduino).</p>
 220: <p>Hands down, I can rule out the I<sub>2</sub>C. <a href="https://electronics.stackexchange.com/a/29041/18442">This post sums it all up:</a></p>

<blockquote>
  <ul>
  <li>SPI is faster.</li>
  <li>I2C is more complex and not as easy to use if your microcontroller doesn't have an I2C   controller.</li>
  <li>I2C only requires 2 lines.</li>
  </ul>
</blockquote>

<p>Since speed is your first priority, either do USB or SPI. I'd personally go with USB, just for the reason that it's simple. Nearly any programming language can inference with COM ports, but that's not the case with SPI. Also, for SPI, you would have to either use a level shifter, or do a voltage divider for the Arduino to RPi wires (for RPi to Arduino wires, Arduino can still sense 3.3V as HIGH.)</p>

<p>Also, <a href="https://arduino.stackexchange.com/a/299/220">serial can be pretty fast</a>. Technically, the Arduino can go up to 2 Mbps (not very fast compared to a lot of things, but fast enough for what the Arduino can even handle). One thing to note, the writer of the post stated that this is the highest you can practically achieve with the poorly optimized libraries:</p>

<pre><code>Serial.begin(500000);
</code></pre>
