user26365: int coilSetOne = 0;
int coilSetTwo = 1;
int coilSetThree = 2;
int coilSetFour = 3;
int switchInput = 4;

void setup()
{
  pinMode(coilSetOne, OUTPUT);
  pinMode(coilSetTwo, OUTPUT);
  pinMode(coilSetThree, OUTPUT);
  pinMode(coilSetFour, OUTPUT);
  pinMode(switchInput, INPUT);
}

void loop()
{
var switchMode = digitalRead(switchInput)
    if ( switchMode == HIGH ) {
        digitalWrite(coilSetOne, HIGH);
        delay(20);
        digitalWrite(coilSetOne, LOW);
        delay(10);
        digitalWrite(coilSetTwo, HIGH);
        delay(20);
        digitalWrite(coilSetTwo, LOW);
        delay(10);
        digitalWrite(coilSetThree, HIGH);
        delay(20);
        digitalWrite(coilSetThree, LOW);
        delay(10);
        digitalWrite(coilSetFour, HIGH);
        delay(20);
        digitalWrite(coilSetFour, LOW);
}}

If the arduino detects that the switch is powered, it should power the coils. They  should stay on for 20m and the delay between coils turning on should be 10ms.

user26341: I ran your code, and the problem seems to be the "var" you declare, which is not an Arduino type. Use int instead. Also if you have PINs 0 and 1 as output, Using the Serial might prove difficult.
    int coilSetOne = 0;
    int coilSetTwo = 1;
    int coilSetThree = 2;
    int coilSetFour = 3;
    int switchInput = 4;

    void setup()
    {
     // Serial.begin(9600);
      pinMode(coilSetOne, OUTPUT);
      pinMode(coilSetTwo, OUTPUT);
      pinMode(coilSetThree, OUTPUT);
      pinMode(coilSetFour, OUTPUT);
      pinMode(switchInput, INPUT);
    }

    void loop()
    {
      int switchMode = digitalRead(switchInput); //Use int
     /* Serial.print(digitalRead(switchInput));
      Serial.print(" ");
      Serial.print(digitalRead(switchInput) == HIGH);
      Serial.print(" ");*/

      if ( switchMode == HIGH ) {
        Serial.print("#Triggered");

        digitalWrite(coilSetOne, HIGH);
        delay(20);
        digitalWrite(coilSetOne, LOW);
        delay(10);
        digitalWrite(coilSetTwo, HIGH);
        delay(20);
        digitalWrite(coilSetTwo, LOW);
        delay(10);
        digitalWrite(coilSetThree, HIGH);
        delay(20);
        digitalWrite(coilSetThree, LOW);
        delay(10);
        digitalWrite(coilSetFour, HIGH);
        delay(20);
        digitalWrite(coilSetFour, LOW);
      }
     // Serial.println();
    }

You didn't explain us the problem so I'm sorry if I missed the point.

26365: <pre><code>int coilSetOne = 0;
int coilSetTwo = 1;
int coilSetThree = 2;
int coilSetFour = 3;
int switchInput = 4;

void setup()
{
  pinMode(coilSetOne, OUTPUT);
  pinMode(coilSetTwo, OUTPUT);
  pinMode(coilSetThree, OUTPUT);
  pinMode(coilSetFour, OUTPUT);
  pinMode(switchInput, INPUT);
}

void loop()
{
var switchMode = digitalRead(switchInput)
    if ( switchMode == HIGH ) {
        digitalWrite(coilSetOne, HIGH);
        delay(20);
        digitalWrite(coilSetOne, LOW);
        delay(10);
        digitalWrite(coilSetTwo, HIGH);
        delay(20);
        digitalWrite(coilSetTwo, LOW);
        delay(10);
        digitalWrite(coilSetThree, HIGH);
        delay(20);
        digitalWrite(coilSetThree, LOW);
        delay(10);
        digitalWrite(coilSetFour, HIGH);
        delay(20);
        digitalWrite(coilSetFour, LOW);
}}
</code></pre>

<p>If the arduino detects that the switch is powered, it should power the coils. They  should stay on for 20m and the delay between coils turning on should be 10ms.</p>
 26341: <p>I ran your code, and the problem seems to be the "var" you declare, which is not an Arduino type. Use int instead. Also if you have PINs 0 and 1 as output, Using the Serial might prove difficult.</p>

<pre><code>    int coilSetOne = 0;
    int coilSetTwo = 1;
    int coilSetThree = 2;
    int coilSetFour = 3;
    int switchInput = 4;

    void setup()
    {
     // Serial.begin(9600);
      pinMode(coilSetOne, OUTPUT);
      pinMode(coilSetTwo, OUTPUT);
      pinMode(coilSetThree, OUTPUT);
      pinMode(coilSetFour, OUTPUT);
      pinMode(switchInput, INPUT);
    }

    void loop()
    {
      int switchMode = digitalRead(switchInput); //Use int
     /* Serial.print(digitalRead(switchInput));
      Serial.print(" ");
      Serial.print(digitalRead(switchInput) == HIGH);
      Serial.print(" ");*/

      if ( switchMode == HIGH ) {
        Serial.print("#Triggered");

        digitalWrite(coilSetOne, HIGH);
        delay(20);
        digitalWrite(coilSetOne, LOW);
        delay(10);
        digitalWrite(coilSetTwo, HIGH);
        delay(20);
        digitalWrite(coilSetTwo, LOW);
        delay(10);
        digitalWrite(coilSetThree, HIGH);
        delay(20);
        digitalWrite(coilSetThree, LOW);
        delay(10);
        digitalWrite(coilSetFour, HIGH);
        delay(20);
        digitalWrite(coilSetFour, LOW);
      }
     // Serial.println();
    }
</code></pre>

<p>You didn't explain us the problem so I'm sorry if I missed the point.</p>
