#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, add more characters as needed)
const uint8_t customFont[32] = {
0xFF, 0xFF, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, // Left 8x8 of 'H'
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xFF, 0xFF,
0xFF, 0xFF, 0x81, 0x81, 0x81, 0x81, 0x81, 0x81, // Right 8x8 of 'H'
0x81, 0x81, 0x81, 0x81, 0x81, 0x81, 0xFF, 0xFF
};
void setup()
{
mx.begin();
mx.control(MD_MAX72XX::INTENSITY, 0);
mx.control(MD_MAX72XX::UPDATE, MD_MAX72XX::OFF);
displayCustomChar(customFont); // Display the custom character
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++) {
mx.setRow(row, charMap[row]); // Left part
mx.setRow(row + 8, charMap[row + 16]); // Right part
}
}