Array?

Hello Will,

The Arduino language define digitalWrite function as :

void digitalWrite(int pin, int val)
{
      if (digitalPinToPort(pin) != NOT_A_PIN) {
            // If the pin that support PWM output, we need to turn it off
            // before doing a digital write.

            if (analogOutPinToBit(pin) == 1)
                  timer1PWMAOff();

            if (analogOutPinToBit(pin) == 2)
                  timer1PWMBOff();

            if (analogOutPinToBit(pin) == 3)
                  timer2PWMOff();

            if (val == LOW)
                  cbi(_SFR_IO8(port_to_output[digitalPinToPort(pin)]),
                        digitalPinToBit(pin));
            else
                  sbi(_SFR_IO8(port_to_output[digitalPinToPort(pin)]),
                        digitalPinToBit(pin));
      }
}

So you cannot use an array in place of int type definition of the pin parameter of the digitalWrite function.

But I think you can make your own definition of a new function wich can use an int array as parameter.

Benoît ROUSSEAU.