Book Image

Arduino Robotic Projects

By : Richard Grimmett
Book Image

Arduino Robotic Projects

By: Richard Grimmett

Overview of this book

Table of Contents (21 chapters)
Arduino Robotic Projects
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Controlling the servo motor shield with a program


Now that your hardware is ready, you'll need to program Arduino to send the proper control signals. To control this shield, you'll need to download a library from Adafruit.

Note

The library for the motor shield can be downloaded from https://learn.adafruit.com/adafruit-16-channel-pwm-slash-servo-shield/using-the-adafruit-library.

Once you have downloaded the library, you'll need to rename it to install it into the IDE. Look for the Adafruit-PWM-Servo-Driver-Library-master.zip file in the directory you downloaded the file from, and unzip this to the directory where your Arduino library is stored, as shown in the following screenshot:

The Adafruit-PWM-Servo-Driver-Library-master directory should now be in the library directory. You'll need to change the name of this directory to AdafruitServoDriver. The library and its examples are now available. You can open the servo example by navigating to File | Examples | AdafruitServoDriver | servo, as shown...