Book Image

Learning JavaScript Robotics

By : Kassandra Perch
Book Image

Learning JavaScript Robotics

By: Kassandra Perch

Overview of this book

Table of Contents (16 chapters)
Learning JavaScript Robotics
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The different kinds of servos and motors


First, we'll go over a few common servos and motors that you'll run into. But first, for those who are new to this, let's look at a quick description of motors and servos.

Defining motors and servos

A motor (or an electrical motor for our purposes) converts electrical energy to motion. Electricity goes in, motion comes out. This motion is output as a rotation motion; one of the most common uses of electronic motors is to turn wheels. Note that while you can control the speed of a motor by controlling the power being input, you cannot change the position of a motor precisely.

This is where servos come in. Servos use electricity to move to a set point—most commonly in an arc of 180 degrees. However, there are some servos that can rotate 360 degrees. We'll discuss these in a moment. Servos are technically specialized motors, and while motors are used to propel projects, servos are used to control them.

Things to keep in mind

There are quite a few servos and...