-2

I am kinda new to a Raspberry Pi (just brought mine before writing this post) but 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 for university and plan on using both the Arduino and Pi to control it. Using the GPIO ports 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 (I really don't want to blow the Raspberry Pi up due to the voltage difference). Any help would be greatly appreciated.

  • 1
    You are forgetting UART (serial). – Gerben May 22 '14 at 17:32
  • 1
    You don't mention the characteristics of the data you expect to flow between the Arduino and Pi. e.g. size, frequency of the various data types, flow direction. Is video going down this link? etc. etc. – joan May 23 '14 at 7:07
4

If you're looking to do a robot then I'd recommend using something like Nanpy. It essentially requires flashing the Arduino and connecting it to the Pi via USB. It's pretty quick and painless to set-up.

You can write your Arduino code in Python and communicate with the GPIO on the Pi within the same script, which can be handy. I've used it on a small robot project too.

| improve this answer | |
  • Thanks man. this is exactly what i needed to build except with an attachment so that my robot can play a ball game (in my case soccer and netball combined). Thanks you everyone for the help – BuddingEngineer May 25 '14 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.