loading
Picture of Building robots with Raspberry Pi and Python
The goal of this tutorial is to help you begin programming with Python to control your Arduino robots with a Raspberry PI. We will go over the basics like installation and some simple examples to control your robot from a Python GUI from Raspberry PI.

 

Step 1: Parts list

Picture of Parts list
In this tutorial we are going to use the following items :

1.   Raspberry PI ( with monitor, USB hub, keyboard, mouse,and WIFI Dongle)
http://www.zagrosrobotics.com/shop/item.aspx?itemid=895

2.   Arduino UNO or compatiable (USB cable)
http://www.zagrosrobotics.com/shop/item.aspx?itemid=868

3.   Wifi Router

Now when it comes to robot bases there are many kits available in size and complexity. In this tutorial I have decided on using this setup with a 12v battery that will give us long run times and high load capacity. And a power distribution board with regulated 12v and 5v power outputs that makes it easy to deliver power to our robot.

4.   Robot Base 
http://www.zagrosrobotics.com/shop/item.aspx?itemid=523

5. Motor Driver
http://www.zagrosrobotics.com/shop/item.aspx?itemid=782

6. Power Distribution Board
http://www.zagrosrobotics.com/shop/item.aspx?itemid=765

7. 12volt  7amp hr Battery
http://www.zagrosrobotics.com/shop/item.aspx?itemid=766
 
googleclone3 months ago

Nice work! I'm trying to wrap my mind around how the R-Pi communicates to the Arduino though

In this case, the writer has the Arduino and RPI connected via USB. The pyserial library is used for the communication on the RPI side and the Serial library (hardware in this case) is used on the Arduino side.

caffewmilk5 months ago

Thank you for sharing. I did a search for raspberry pi robot tutorial and your instructable was at the top 3 links. I have a more genera unrelated question and I apologize for it: how do you guys come up with the funds for all these fun projects?

I'm looking forward to building a raspberry pi robot. Thanks.

Epic1219 months ago

Do u have the circuit diagram of this robot? If you have please share.

jamesthequack11 months ago

Very very nice! I like your style!

ecommgeek1 year ago

What kind of wire do I need to hook this all up?

ZRob314 (author)  ecommgeek1 year ago

We normally just use jumper wires similar to these:

http://www.zagrosrobotics.com/shop/item.aspx?itemi...

You will probalby want some male-male and male-female

MoserLabs1 year ago

Nice work! I'm trying to wrap my mind around how the R-Pi communicates to the Arduino though. From the one image it's got a 5V connection to the Arduino, but there aren't any data connections from Pi to Arduino?

dhill291 year ago

Hi Fells, there was a problem with the sketch provided. To make it work you will need to change

int r_motor_pwm = 10;

to

int r_motor_pwm = 3;

ZRob314 (author)  dhill291 year ago

This depends on the version of the motor driver listed above or if a different motor drive is used. Always double check the data sheets or specs on your components/devices against your code to avoid any confusion during setup/operation.

Thanks ZRob, That is very good advice. I had bought the exact parts linked to from you and it just is a little thing that tripped me up as a beginner. I wanted to make sure any other inexperienced people would be able to find the problem easily.
epierce1 year ago
This works sweet! Have you tried to run it with NetIO on an Android or Iphone device?
epierce1 year ago
Zrob thanks for helping a 50 year old realize his bot dreams!! I have been hitting a brickwall with this project for 6 months!! Unfortunatley my wife is screaming at me for yelling ITS ALIVE!!! at 1:00 am!!LOL II now realize why the villagers actually destroyed Dr. Frankenstein's lab. Any way to program the button control to an android tablet or phone?
purpulhaze1 year ago
Great instructable! I think I'm gonna try this as I have all the parts on hand. Do you know how one would go about adding live video streaming to something like this? I have a camera module on the way and also a compatible webcam. Though I wasn't impressed with the usb webcam performance.
nerd74731 year ago
cool
Selenae2 years ago
Thank you for your post, I was blocked with the python part of my project and you give me some robust base to begin my learn :-)
uavguy2 years ago
Wow this is so awesome! I just got a Raspberry Pi and I have been wanting to use it for robotics. Thank you for taking the time to put this together I know it will be a big help to me!