Chapter 7

More Basic Sketches: Motion and Sound


check Moving DC motors

check Switching bigger loads with transistors

check Speeding up your motor

check Turning with precision using a stepper motor

check Making electronic music with a buzzer

Chapter 6 shows you how to use some simple LEDs as outputs for various circuits. In Arduino land, nothing is more beautiful than a blinking LED, but you have a variety of other outputs as options. In this chapter, I explore two other areas: motion provided by motors and sound from a buzzer.

Working with Electric Motors

Electric motors allow you to move things with electricity using the power of electromagnetism. When an electrical current is passed through a coil of wire, it creates an electromagnetic field. This process works similarly to a normal permanent bar magnet but gives you control over the presence of the field, meaning that you can turn it on and off at will and even change the direction of the magnetism. As you may remember from school, magnets ...

Get Arduino For Dummies, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.