The problem with Arrays is that im not sure how they work same as the idea of using binary codes.
The general idea is, instead of writing expansive code like:
digitalWrite(0, LOW);
digitalWrite(1, HIGH);
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
...
digitalWrite(15, HIGH);
you encode the sequence of steps into concise data form like
byte pindata[16] = {LOW, HIGH, HIGH, LOW, ..., HIGH};
for (int i=0; i<16; ++i)
digitalWrite(i, pindata[i]);
On the other hand, I don't know how it's phrased in Australia, but in Texas we say "if it ain't broke, don't fix it.". ![]()
Mikal