Wiring a servo motor
So far, we have been using sensors to retrieve data from the real world and we displayed information in LCD and OLED displays. However, IoT devices are not limited to sensing and displaying data, they can also move things. We can connect different components, shields, or breakout boards to our Intel Galileo Gen 2 board and write Python code to move things connected to the board.
Standard servo motors are extremely useful to precisely control a shaft and position it at various angles, usually between 0 and 180 degrees. In Chapter 4, Working with a RESTful API and Pulse Width Modulation, we worked with pulse width modulation, known as PWM, to control the brightness of an LED and a RGB LED. We can also use PWM to control a standard analog servo motor and position its shaft at a specific angle.
Tip
Standard servo motors are DC motors that includes gears and feedback control loop circuitry that provides precision positioning. They are ideal for pinion steering, robot arms and...