Chapter 4

Making Things Move

IN THIS CHAPTER

check Moving things with Python

check Understanding DC motors and software

check Using a servo motor

check Making a stepper motor step

Making things move around with Python is undeniably cool. With motors, physical computing goes to a whole new level.

Robots, microwaves, refrigerators, and electric cars use electric motors to move around, blow air, pump coolant, and take you 60 mph wherever you want to go. Electric motors are everywhere — they consume more than half the electric energy produced in the United States.

At its simplest, an electric motor is a machine that converts electrical energy into mechanical energy. In this chapter, we talk about DC (direct current) motors. Direct current is a single, fixed voltage, such as 9V or 5V or 3.3V. Alternating current (AC), on the other hand, is what you get out of your house outlets.

To download the code for this chapter, go to www.dummies.com/go/pythonaiofd2e.

Exploring Electric Motors

All motors use magnets to create motion. All magnets have a north and a south pole. North to north and south to south repel each ...

Get Python All-in-One For Dummies, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.