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
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Raspberry Pi 3 Cookbook for Python Programmers

You're reading from   Raspberry Pi 3 Cookbook for Python Programmers Unleash the potential of Raspberry Pi 3 with over 100 recipes

Arrow left icon
Product type Paperback
Published in Apr 2018
Publisher
ISBN-13 9781788629874
Length 552 pages
Edition 3rd Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Steven Lawrence Fernandes Steven Lawrence Fernandes
Author Profile Icon Steven Lawrence Fernandes
Steven Lawrence Fernandes
Tim Cox Tim Cox
Author Profile Icon Tim Cox
Tim Cox
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Getting Started with a Raspberry Pi 3 Computer FREE CHAPTER 2. Dividing Text Data and Building Text Classifiers 3. Using Python for Automation and Productivity 4. Predicting Sentiments in Words 5. Creating Games and Graphics 6. Detecting Edges and Contours in Images 7. Creating 3D Graphics 8. Building Face Detector and Face Recognition Applications 9. Using Python to Drive Hardware 10. Sensing and Displaying Real-World Data 11. Building Neural Network Modules for Optical Character Recognition 12. Building Robots 13. Interfacing with Technology 14. Can I Recommend a Movie for You? 15. Hardware and Software List 16. Other Books You May Enjoy

Controlling servos directly with ServoBlaster


The previous recipe demonstrated using a dedicated servo controller to handle the control of the servos used by the Pi-Bug. This has the advantage that any disturbances in the processing taking place on the Raspberry Pi do not cause interference with the delicate servo control (since the controller will continue to send the correct signals).

However, the Raspberry Pi is also capable of direct servo control. To achieve this, we will make use of Richard Hurst's ServoBlaster, which is a multiple servo driver.

In this recipe, we will control four servos attached to the MeArm, a simple laser-cut robot arm; however, you can choose to fit servos to whatever device you like:

The MeArm is a simple robot arm powered by four miniature servos

Getting ready

Most common servos will have three wires and a three pin connector, as follows:

Black/Brown

Red

Orange/White/Yellow/Blue

Ground

Positive supply (typically 5V for small servos)

Signal

While it is usually possible to...

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