Mobile controlled Pi Robot

Featured image

The goal of this tutorial is to help you begin programming with Python to control your Raspberry PI Robot using mobile Application (Android)

Components Required:

1. Rasbperry Pi(with Wifi Dongle)–198?search=pi

2. DIY Kit(robotic Base,Two DC Motors, etc)

3. Motor Driver Board

Android Application for Pi Robot

    1. You can download the Android Application(apk file) from github

    2. You have to install it in your android phone

    3. Make mobile as Hotspot for controlling robot.

    (or you have to connect mobile and raspberry pi into same Wifi network)

Raspberry Pi configuration

1. You must install the Raspian OS in the SD card.

2. You can connect the internet using GUI or Terminal commands for Downloading python library file

Terminal commands:

1. Network Connection:

Check the available wifi

sudo iwlist wlan0 scan
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Now save the file by pressing ctrl+x then y, then finally press enter.

Reboot the Rpi

2. Python library File (GPIO library file Loading)

sudo apt-get install python-dev

If asked for confirmation on either of these, press Y

sudo apt-get install python-rpi.gpio

Python program for Pi Robot

    1. you can download python program from github

2. Save the code file in any Directory

3. Connect the mobile to the same Wifi network or Change the raspberry Pi network connection to mobile hotspot.

4. Check ip Address of RaspberryPi using the Terminal command


It will give list as follow


    3. Run python program using Terminal commands

        – locate file Directory

cd (file Directory)

– View the python file

sudo nano

– Change IP address in a code with your Rasbperry Pi IP Address


(eg: to rasbperry Pi IP)

-Save the file (Ctrl+x and ‘y’ for yes)

-Run the python programm using command

sudo python

Android Application Configuration

1. Open your Android Application

2. Enter the IP address (Raspberry Pi IP Address) and port (9000) given in the Code. Then press the connect Button

3. Now, you can control the Pi robot using the five Button given in the Android Application



10 thoughts on “Mobile controlled Pi Robot

    • hi there, already tried and construct the robo. Got few questions.
      Mine able to connect with rpi, everything in order. the thing is….robo dont move. Rpi indicated receive of signal but from rpi to output(the motors) thru gpio, cant get anything.
      Any suggestion?

    • Line number 18 is “state = True” and will not have any error. The error may be due to incorrect IP address. you need to give the correct IP address of your phone in the “HOST”. Check the IP address of your phone in settings or any 3rd party application

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s