Hardware Reference
In-Depth Information
5 volts and ground through the servo's red and black wires. Your Galileo will
send signal pulses to the motor to set its position through its yellow wire.
Figure 3-17. Hobby servos like the ones pictured come in many different
sizes and varieties but generally operate in the same way.
Sending the right high and low pulses to a servo (or servos) might be a bit
difficult and time consuming if you had to write the code by yourself. Luckily,
you have access to an Arduino library to help you work with servo motors
with very little fuss. A library is a collection of code that makes complex cod-
ing tasks easier. Instead of needing to know what rate you need to send pulses
and how to send them without blocking the rest of your code from running,
you can simply input the angle into a function from the library. The Galileo
will start sending the appropriate pulse until you tell it to stop or change the
angle ( Figure 3-18 ).
Search WWH ::




Custom Search