Being able to turn things is pretty useful. Robots for example have lot of motors in them.

There are a few different types of motor. Each work in a slight different way and are suited to different tasks, the two types we'll be looking at today are:

As motors need quite a bit of power they can't be powered directly from the Adruino pins. Some extra electronics are required to avoid damaging the Arduino. These are usually based around transistors, that act as electronic switches. To save time we'll be using pre-build shields but this could be wired up directly.

Motor Shield

motorshield.jpg

https://learn.adafruit.com/adafruit-motor-shield/use-it

There are several different types of motor and servo supported by this shield. With helpers assistance you should be able to experiment with a few of these.

Small Stepper Motor with Driver

stepper.jpg

There is some example code on http://www.4tronix.co.uk/arduino/Stepper-Motors.php

challenge_yourself.jpg Easier
(1) Turn the small stepper motor a full resolution in one direction and back again.

Intermediate
(2) Turn the stepper motor at a speed that takes about 60 seconds to make a full rotation.