Book Image

Getting Started with Python for the Internet of Things

By : Tim Cox, Steven Lawrence Fernandes, Sai Yamanoor, Srihari Yamanoor, Prof. Diwakar Vaish
Book Image

Getting Started with Python for the Internet of Things

By: Tim Cox, Steven Lawrence Fernandes, Sai Yamanoor, Srihari Yamanoor, Prof. Diwakar Vaish

Overview of this book

This Learning Path takes you on a journey in the world of robotics and teaches you all that you can achieve with Raspberry Pi and Python. It teaches you to harness the power of Python with the Raspberry Pi 3 and the Raspberry Pi zero to build superlative automation systems that can transform your business. You will learn to create text classifiers, predict sentiment in words, and develop applications with the Tkinter library. Things will get more interesting when you build a human face detection and recognition system and a home automation system in Python, where different appliances are controlled using the Raspberry Pi. With such diverse robotics projects, you'll grasp the basics of robotics and its functions, and understand the integration of robotics with the IoT environment. By the end of this Learning Path, you will have covered everything from configuring a robotic controller, to creating a self-driven robotic vehicle using Python. • Raspberry Pi 3 Cookbook for Python Programmers - Third Edition by Tim Cox, Dr. Steven Lawrence Fernandes • Python Programming with Raspberry Pi by Sai Yamanoor, Srihari Yamanoor • Python Robotics Projects by Prof. Diwakar Vaish
Table of Contents (37 chapters)
Title Page
Copyright and Credits
About Packt
Contributors
Preface
Index

Servo motor


So, let me introduce you to servo motor. Servo motor is basically a motor with a few added components. Now to understand what those added components, let's first go through this example. Let's say that you want to go to London. Now to see how you have to go there and what would be the route to reach London, the first thing you need to know is that where exactly you are now. If you don't know where you are currently, it is impossible to calculate a route. Similarly, if we want to reach a certain position of motor, we need to know where the shaft of the motor is standing right now. To do this, we use a potentiometer. A potentiometer is basically a variable resistor that essentially has a shaft that when rotated changes the value of resistance. A variable resistor looks like this:

When the value of resistor change, then the output voltage from the resistor will also change. The interesting thing is that if the input voltage to the potentiometer is well known, then the output voltage...