Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Getting Started with Raspberry Pi Zero

You're reading from  Getting Started with Raspberry Pi Zero

Product type Book
Published in Mar 2016
Publisher
ISBN-13 9781786469465
Pages 228 pages
Edition 1st Edition
Languages
Author (1):
Richard Grimmett Richard Grimmett
Profile icon Richard Grimmett

Table of Contents (16) Chapters

Getting Started with Raspberry Pi Zero
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. Getting Started with Raspberry Pi Zero 2. Programming Raspberry Pi Zero 3. Accessing the GPIO Pins on Raspberry Pi Zero 4. Building and Controlling a Simple Wheeled Robot 5. Building a Robot That Can Walk 6. Adding Voice Recognition and Speech – A Voice Activated Robot 7. Adding Raspberry Pi Zero to an RC Vehicle 8. Playing Rock, Paper, or Scissors with Raspberry Pi Zero 9. Adding Raspberry Pi Zero to a Quadcopter Index

Controlling the vehicle using the Raspberry Pi Zero in Python


The first step to take advantage of the functionality is to install the library associated with the control board, which can be found at http://www.monkmakes.com/?page_id=698. You need to connect your Raspberry Pi Zero to the Internet with either a wired or WLAN connection. Issue the following commands in a terminal window on your Raspberry Pi Zero:

  1. Type wget https://github.com/simonmonk/raspirobotboard2/raw/master/python/dist/rrb2-1.1.tar.gz: This will download the library to your Raspberry Pi.

  2. Type tar -xzf rrb2-1.1.tar.gz: This unarchives the library.

  3. Type cd rrb2-1.1: This changes directory to the location of the files.

  4. Type sudo python setup.py install: This installs the libraries.

Now that you have the library code installed, you need to create some Python code that will allow you to access the two motors. The first part of the code should look as follows:

The second part of the code that drives the two different motors, based...

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 $15.99/month. Cancel anytime}