Arrays as arguments for i/o

Hi, I’m new to this forum so not sure if I’m posting to the correct section. I have a simple question relating to i/o. Can the instructions pinMode, digitalWrite and digitalRead take one-dimensional arrays as arguments? An additional question that may not apply - if arrays are acceptable do they have to be dimensionally consistent between instructions?

Thanks to any gurus.

Can the instructions pinMode, digitalWrite and digitalRead take one-dimensional arrays as arguments?

Nope. If you want to read/write multiple I/O pins at once, you need to manipulate registers directly. For example:

DDRD |= 0x0F; // set digital pins 0 - 3 as outputs PORTD |= 0x0F; // set digital pins 0 - 3 HIGH

  • Ben