Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Raspberry Pi Blueprints

You're reading from   Raspberry Pi Blueprints Design and build your own hardware projects that interact with the real world using the Raspberry Pi

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher
ISBN-13 9781784392901
Length 284 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. Raspberry Pi Pirate Radio FREE CHAPTER 2. Portable Speaker System 3. Mini Retro Arcade Cabinet 4. GPS-enabled Time-lapse Recorder 5. Home Theater PC 6. Outdoor Weather Station 7. Home Security System 8. Remote-operated Robotic Arm 9. Magic Mirror 10. Bottle Xylophone Index

Deploying web applications


Next, we will deploy the web application that will allow us to control the arm and chassis remotely and view the video stream from the Pi camera. Since this web application is also built using the Flask framework, the process of deploying it will again be similar to that used in the previous chapters.

Before we start, be sure to copy the config_files and robot_arm_webapp directories from the project files to the /home/pi directory on the Pi:

  1. First, we will install the required packages and libraries, including the RPIO Python library used to control the GPIO pins from Python:

    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install python-pip git python-dev gunicorn supervisor nginx
    sudo pip install RPIO
    
  2. Next, download and install the Flask framework:

    git clone https://github.com/mitsuhiko/flask.git
    cd flask
    sudo python setup.py install
    cd
    
  3. Now, copy the Nginx configuration and perform the configuration self-test:

    sudo cp config_files/nginx/robot_arm.conf /etc...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image