#include <LedControl.h>

                               // Initialize with DIN=12, CLK=11, CS=10
LedControl lc = LedControl(12, 11, 10, 1);

void setup() {
  lc.shutdown(0, false);      // Wake up MAX7219
  lc.setIntensity(0, 15);     // Set brightness level (0-15)
  lc.clearDisplay(0);         // Clear display
}

void loop() {
                             // Display an example pattern
  byte smiley[8] = {
    0b00111100,
    0b01000010,
    0b10100101,
    0b10000001,
    0b10100101,
    0b10011001,
    0b01000010,
    0b00111100
  };

  for (int row = 0; row < 8; row++) {
    lc.setRow(0, row, smiley[row]);
  }
 delay(1000);
 
    byte sad[8] = {
  0b11100111,
  0b00000000,
  0b01100110,
  0b00000000,
  0b00111100,
  0b01111110,
  0b11000011,
  0b11000011
  };

  for (int row = 0; row < 8; row++) {
    lc.setRow(0, row, sad[row]);
  }
  delay(1000);
}