O'Reilly logo

Intel Galileo Networking Cookbook by Marco Schwartz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling a servomotor from a rotating knob

We are now going to link an input component (a rotating knob) with an output, in this case a servomotor. A servomotor is a DC motor which has extra components so that it can be controlled precisely. You can, for example, order it to turn at a given angle. We will write some code so that, when the knob is turned, the servomotor will turn instantly as well.

Getting ready

You will need two extra components for this project—a servomotor and a rotating knob.

I used a standard 5V servomotor for this recipe, and most brands will work for this project. It just needs to be rated at 5V. I also used a small 10k rotating potentiometer to act as the rotating knob.

This is a list of all the extra components that I used ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required