Wiring Diagram for DC Motor + Domo*pes or Arduino + Circuit + Code

This will make your DC motor go forwards, then backwards repeatedly. It is done by using four transistors. They will split the two wires from motor and make four wires. One half is forward's ground and +. The other half is reverse's ground and +.

Supplies:
-DC Motor
-a Domo*pes or an Arduino
-4 2222A NPN Transistors from Radio Shack or wherever - be careful not to mistake for PNP
npn transistor
-Breadboard from Radio Shack or wherever
-Wire such as CAT5 or whatever
-Power Source for motor - depends on motor but somewhere around 3V probably and around 5V for Domo*pes or Arduino. So, a 9-12V 800-1000mA would be a good starting point.
-DC Move Motor Sketch for Domo*pes and Arduino

Breadboard View:
The transistor name 2222A should face you like the N in pic below when enlarged. If not, the collector and emitter will be backwards.

Enlarged View of Transistor's Position (all face the same way) transistor position

Schematic:
M1 DC Motor
VCC1 Power Supply
Q1-Q4 NPN Transistor

DC Motor Board EAGLE files
CC BY-NC-SA
dc board
I have not made it yet so I DO NOT guarantee it will work. Just here for a starting point if someone wants to make one for a project. -Amy
.BRD .SCH