Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Intel Galileo Essentials

You're reading from  Intel Galileo Essentials

Product type Book
Published in Feb 2015
Publisher
ISBN-13 9781784398903
Pages 162 pages
Edition 1st Edition
Languages

Table of Contents (15) Chapters

Intel Galileo Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Getting Started with the Galileo Accessing the GPIO Pins Adding Display Functionality Controlling DC Motors Adding Sensors Remote Control Going Further with Galileo Speech Output Index

Creating a program in Linux so that you can control your quadruped


You now know that you can talk to your servo motor controller, and move your servos. In this section, you'll create a python program that will let you talk to your servos to move them to specific angles. You'll use python as it is very simple and easy to run.

Let's start with a simple program that will make your legged mobile robot's servos go to 90 degrees (this should be somewhere close to the middle of the 0 to 180 degrees you can set.) If you are unfamiliar with the editing code in Linux, the best source is a tutorial on the editor you are using. For nano try http://www.howtogeek.com/howto/42980/the-beginners-guide-to-nano-the-linux-command-line-text-editor/. Here is the code:

Here is an explanation of the code:

  1. #!/usr/bin/python:- This first line allows you to make this python file execute from the command line.

  2. import serial:– This line imports the serial library. You need the serial library to talk to your unit via USB...

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}