#include "MD_MAX72xx.h"
#include "SPI.h"
#define HARDWARE_TYPE MD_MAX72XX::PAROLA_HW
#define Baris 2
#define Kolom 5
#define MAX_DEVICES (Baris * Kolom)
#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10
MD_MAX72XX mx = MD_MAX72XX(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);
// Custom 16x16 font bitmap for character 'H' (example)
const uint8_t customFont[32] = {
0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81,
0xC3, 0x00, 0x00, 0x00, 0x00, 0xC3, 0xC3, 0xFF,
0xE7, 0xE7, 0xE7, 0x00, 0x00, 0xE7, 0xE7, 0xE7,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
};
void setup()
{
Serial.begin(9600);
mx.begin();
mx.control(MD_MAX72XX::INTENSITY, 0);
// mx.control(MD_MAX72XX::UPDATE, MD_MAX72XX::OFF);
displayCustomChar(customFont);
// mx.control(MD_MAX72XX::UPDATE, MD_MAX72XX::ON);
}
void loop()
{
// No animation, static display
}
// Function to display a custom 16x16 character
void displayCustomChar(const uint8_t *charMap)
{
for (uint8_t row = 0; row < 8; row++) {
for (uint8_t col = 0; col < 2; col++) {
// Calculate the appropriate device number
uint8_t deviceNum = col * 8 + row;
// Set the row for each part of the character
if (col == 0) {
mx.setRow(1, charMap[row]); // Left 8x8
//Serial.println(charMap[row]);
} else {
mx.setRow(1, charMap[row + 16]); // Right 8x8
}
}
}
}