/*
  Arduino | general
  |°ΉӨMΣ°| — 6/18/24 at 8:09 PM
  is there any error? idk
*/

const int NUM_PINS = 4;
const int PATTERN_ROWS = 8;
const int PATTERN_COLS = NUM_PINS;
const int B_PINS[NUM_PINS] = {11, 10, 9, 8};
const bool PATTERNS[PATTERN_ROWS][PATTERN_COLS] = {
  {HIGH, LOW, LOW, LOW},
  {LOW, HIGH, LOW, LOW},
  {LOW, LOW, HIGH, LOW},
  {LOW, LOW, LOW, HIGH},
  {HIGH, LOW, LOW, HIGH},
  {LOW, HIGH, HIGH, LOW},
  {HIGH, LOW, HIGH, LOW},
  {LOW, HIGH, LOW, HIGH}
};

void setup() {
  Serial.begin(9600);
  for (int i = 0; i < NUM_PINS; i++) {
    pinMode(B_PINS[i], OUTPUT);
  }
}

void loop() {
  // show each pattern row for 5 seconds
  for (int patternRow = 0; patternRow < PATTERN_ROWS; patternRow++) {
    Serial.print("Row\t");
    Serial.println(patternRow);
    Serial.print("Col\t");
    for (int patternCol = 0; patternCol < PATTERN_COLS; patternCol++) {
      digitalWrite(B_PINS[patternCol], PATTERNS[patternRow][patternCol]);
      Serial.print(PATTERNS[patternRow][patternCol] ? "HIGH" : "LOW");
      Serial.print("\t");
    }
    Serial.println();
    delay(2000);
  }
  Serial.println();
}
$abcdeabcde151015202530fghijfghij