Book Image

Getting Started with Raspberry Pi Zero

By : Richard Grimmett
Book Image

Getting Started with Raspberry Pi Zero

By: Richard Grimmett

Overview of this book

Raspberry Pi Zero is half the size of Raspberry Pi A, only with twice the utility. At just three centimeters wide, it packs in every utility required for full-fledged computing tasks. This practical tutorial will help you quickly get up and running with Raspberry Pi Zero to control hardware and software and write simple programs and games. You will learn to build creative programs and exciting games with little or no programming experience. We cover all the features of Raspberry Pi Zero as you discover how to configure software and hardware, and control external devices. You will find out how to navigate your way in Raspbian, write simple Python scripts, and create simple DIY programs.
Table of Contents (16 chapters)
Getting Started with Raspberry Pi Zero
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Using a motor controller board to control the DC motors


To build this project, you'll start by installing the motor controller board on top of the Raspberry Pi Zero, like this:

The board provides the drive signals for the DC motors on the vehicle. You can also turn the vehicle by driving each motor separately. You can change the vehicle's direction and make very sharp turns by reversing the signals. The following steps show how to connect the motor control board:

  1. Connect the battery power connector to the power connector on the board. Use a 6 to 7.4 volts battery; you can either use a 4 AA battery holder or a 2S LiPo RC battery. Connect the ground and power wires to the motor control board as shown:

  2. Next, connect one of the drive signals to the motor 1 connector on the board. Connect motor 1 to the right motor and motor 2 to the left, as shown:

  3. Then, connect the second drive connector to the motor 2 connector on the board. The entire set of connections should look like this:

Now you are ready...