Reader small image

You're reading from  Intel Galileo Blueprints

Product typeBook
Published inJun 2015
Publisher
ISBN-139781785281426
Edition1st Edition
Tools
Concepts
Right arrow
Author (1)
Marco Schwartz
Marco Schwartz
author image
Marco Schwartz

Marco Schwartz is an electrical engineer, entrepreneur, and blogger. He has a master's degree in electrical engineering and computer science from Supélec, France, and a master's degree in micro engineering from the Ecole Polytechnique Fédérale de Lausanne (EPFL), Switzerland. He has more than five years' experience working in the domain of electrical engineering. Marco's interests center around electronics, home automation, the Arduino and Raspberry Pi platforms, open source hardware projects, and 3D printing. He has several websites about the Arduino, including the Open Home Automation website, which is dedicated to building home automation systems using open source hardware. Marco has written another book on home automation and the Arduino, called Home Automation With Arduino: Automate Your Home Using Open-source Hardware. He has also written a book on how to build Internet of Things projects with the Arduino, called Internet of Things with the Arduino Yun, by Packt Publishing.
Read more about Marco Schwartz

Right arrow

Using the servomotor controller


After we have assembled the servomotor controller circuit, we need to work on the Arduino sketch of the servomotor controller.

However, before that, you need to know that we need to match the turn of our potentiometer to the change on the angle of the servomotor. We should be wary of the potentiometer and be extra careful of our precision. We want our servomotor to give a relevant change with the turn that we make on our potentiometer.

Since we are using the Galileo board Gen 2, this wouldn't be a problem. Thanks to its 12-bit PWM output, we can be ensured of precision control.

Galileo Gen 2 makes use of an NXP PCA9685 PWM driver IC with 12-bit resolution. This is what makes a fine-grained control on the PWM duty cycle possible.

At this time, we are ready to write the code which will enable us to control the servomotor through the potentiometer, by following these steps:

  1. The first thing that we should do is include the servo library, so that we will have codes...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Intel Galileo Blueprints
Published in: Jun 2015Publisher: ISBN-13: 9781785281426

Author (1)

author image
Marco Schwartz

Marco Schwartz is an electrical engineer, entrepreneur, and blogger. He has a master's degree in electrical engineering and computer science from Supélec, France, and a master's degree in micro engineering from the Ecole Polytechnique Fédérale de Lausanne (EPFL), Switzerland. He has more than five years' experience working in the domain of electrical engineering. Marco's interests center around electronics, home automation, the Arduino and Raspberry Pi platforms, open source hardware projects, and 3D printing. He has several websites about the Arduino, including the Open Home Automation website, which is dedicated to building home automation systems using open source hardware. Marco has written another book on home automation and the Arduino, called Home Automation With Arduino: Automate Your Home Using Open-source Hardware. He has also written a book on how to build Internet of Things projects with the Arduino, called Internet of Things with the Arduino Yun, by Packt Publishing.
Read more about Marco Schwartz