Controlling small motors with code, sometimes...

Okay, I have 20 motors I want to run.
This is my code…

void setup ()
{
 pinMode(0, OUTPUT);
 digitalWrite(0, LOW);
 pinMode(1, OUTPUT);
 digitalWrite(1, LOW);
 pinMode(2, OUTPUT);
 digitalWrite(2, LOW);
 pinMode(3, OUTPUT);
 digitalWrite(3, LOW);
 pinMode(4, OUTPUT);
 digitalWrite(4, LOW);
 pinMode(5, OUTPUT);
 digitalWrite(5, LOW);
 pinMode(6, OUTPUT);
 digitalWrite(6, LOW);
 pinMode(7, OUTPUT);
 digitalWrite(7, LOW);
 pinMode(8, OUTPUT);
 digitalWrite(8, LOW);
 pinMode(9, OUTPUT);
 digitalWrite(9, LOW);
  pinMode(10, OUTPUT);
 digitalWrite(10, LOW);
  pinMode(11, OUTPUT);
 digitalWrite(11, LOW);
  pinMode(12, OUTPUT);
 digitalWrite(12, LOW);
  pinMode(13, OUTPUT);
 digitalWrite(13, LOW);
  pinMode(14, OUTPUT);
 digitalWrite(14, LOW);
  pinMode(15, OUTPUT);
 digitalWrite(15, LOW);
  pinMode(16, OUTPUT);
 digitalWrite(16, LOW);
  pinMode(17, OUTPUT);
 digitalWrite(17, LOW);
 pinMode(18, OUTPUT);
 digitalWrite(18, LOW);
  pinMode(19, OUTPUT);
 digitalWrite(19, LOW);
}
void loop ()
{
for(int i=0;i<19;i++)
{
    digitalWrite(i, HIGH);
    delay(2000);
    digitalWrite(i, LOW);
    delay(1000);
}
}

It works when I set i as the variable, but when I go back through and comment out the for loop and specify a specific pin instead of i. NONE of them work, even the ones I know should. I haven’t changed anything in setup, only the loop. When I switch it back to i, it hums along nicely.

I’m extremely confused why this would happen… anyone care to explain?

Okay, I have an update!

When I select a single motor, like this

byte m1 = 19;


void setup()
{
  pinMode(m1, OUTPUT);
  digitalWrite(m1, LOW);

}
void loop()
{
  digitalWrite(m1, HIGH);
  delay(1000);
  digitalWrite(m1, LOW);
  delay(500);

}

No worky, no matter the pin.

But, when I go like this

byte m1 = 19;
byte m2 = 18;

void setup()
{
  pinMode(m1, OUTPUT);
  digitalWrite(m1, LOW);
  pinMode(m2, OUTPUT);
  digitalWrite(m2, LOW);
}
void loop()
{
  digitalWrite(m1, HIGH);
  delay(1000);
  digitalWrite(m1, LOW);
  delay(500);
  digitalWrite(m2,HIGH);
  delay(1000);
  digitalWrite(m2, LOW);
  delay(500);
}

It operates both motors at the same time. I do have a diode inline with the motors, because I was getting funky operation before. The really weird thing is that I have a diode in there with the motors. I connected it so the ring was oriented away from the board. It runs through the motor, and to a common ground for all the motors. I believe it may be something with this, as one motor doesn't work but two does. (Even though my code posted earlier still works. I'll attach a picture to show my wiring.

http://imgur.com/FK1G5.jpg

EDIT FOR CLARITY:: The wires with the diodes go to motors, the wires without diodes go to switches, so I have no idea why the motors wouldn't work. The red wire separate goes to the ground pin, where all the switches/wires go.

http://imgur.com/FMRE8.jpg That's the wiring diagram.

What is the motor you are running?

Are you trying to connect motors directly to the Arduino digital I/O pins? If so, it's unlikely to work, because a digital pin can only supply 40mA, which is not enough to run a motor. You'll need some sort of motor driver, such as a ULM2803 or a bunch of discrete transistor drivers.