DC Motor driver with Arduino
+12V ---------+---------+          (Connect to the Vin or 9v on the Arduino)
              |         |
             / \        |
             |M| motor ---  1N4001
             \ /       / \
              |         |
              +---------+
              |
            |/
CTL -/\/\/--|    2N2222 NPN        (Connect CTL to your Digital out pin)
      1k    |\&gt;
              |
             ---
              -                    (Connect this to Gnd)