STEP FOUR: Drive two motors

Overview

In this lesson, you will add a second motor to your board.

Exercise:

  1. Connect a second motor to BOUT1 and BOUT2.

  2. Connect BIN1 and BIN2 to two additional pins on your Metro Mini.

  3. Add defines to your program for these two new pins.

  4. Write a program to drive both motors in the opposite direction for three seconds and stop.

  5. Modify your program to drive both motors in the same direction for two seconds and then in the opposite direction.