#include <LedControl.h>
// Pin configuration for MAX7219 module
const int DIN_PIN = 7; // Data in
const int CLK_PIN = 6; // Clock
const int CS_PIN = 5; // Chip Select
LedControl lc = LedControl(DIN_PIN, CLK_PIN, CS_PIN, 1); // Only one MAX7219 module
void setup() {
lc.shutdown(0, false); // Wake up the MAX7219 module
lc.setIntensity(0, 8); // Set the brightness (0-15)
lc.clearDisplay(0); // Clear the display
}
void displayCharacter(byte pattern[], int startX, int startY) {
for (int row = 0; row < 9; row++) {
lc.setRow(0, row + startY, pattern[row] << startX);
}
}
void loop() {
// Define the pattern for the letter "B"
byte patternB[] = {
B001110001,
B001001001,
B001001001,
B001110001,
B001001001,
B001001001,
B001110001,
B000000001
};
// Display "B" at the start
displayCharacter(patternB, 0, 0);
}