I have this debug output sequence in my code
// C++ does not use named parameters so, to make things more clear,
// we get the parameter values individually.
// the 0..9 range references the variable coordinateByte[]
row = random(0, 9);
column = random(0, 9);
// interval is any old time lapse
interval = random(200, 2000);
if (DEBUG)
{
Serial.print("row number is ");
Serial.println(row, DEC);
Serial.print("row pattern is ");
Serial.println(~coordinateByte[row], BIN);
Serial.print("column number is ");
Serial.println(column, DEC);
Serial.print("column pattern is ");
Serial.println(coordinateByte[column], BIN);
Serial.print("interval period is ");
Serial.print(interval, DEC);
Serial.println(" ms");
Serial.println();
}
(coordinateByte[] is defined as
// define data to write to matrix
int coordinateByte[] = {0, 1, 2, 4, 8, 16, 32, 64, 128 };
The debug printout I get is
Opening port
Port open
row pattern is 11111111111111111111111111110111
column pattern is 1
interval period is 353 ms
row pattern is 11111111111111111111111111101111
column pattern is 10000
interval period is 988 ms
row pattern is 11111111111111111111111111011111
column pattern is 100000
interval period is 1763 ms
row pattern is 11111111111111111111111101111111
column pattern is 10000
interval period is 1573 ms
row pattern is 11111111111111111111111101111111
column pattern is 1000
interval period is 216 ms
row pattern is 11111111111111111111111111110111
column pattern is 10000000
interval period is 358 ms
Why does row pattern show as four bytes? Is it that feral tilde ('~')?