Code for Dot Matrix custom icons

Hey everybody,
I've connected a MAX7219 dot matrix display to my arduino. What code do I need to just show custom icons, so not regular ASCII symbols. eventually I want to skip to 7 icons with a simpel pushbutton.
I've tried a lot of example sketches, but I cannot understand them enough to change them for my purpose.

Thanks a bunch.

Make yourself a chart like this, I used Excel, and translate your icon into 1s & 0s. You will then send these bytes to the MAX72319 to display.
Using HEX format makes it easy to keep the program size smaller.
Can also use binary format: 0b00000001 vs 0x01, 0b01000001 vs 0x41, etc.

5x8fonts.xlsx (21.9 KB)

Thanks, good tip, i'm going to try that.

Hey one more question. what function do i need for the hex format? something like setChar or something? i can't seem to make this happen.

No function needed.
SPI.transfer(0x41);

or
byte fontArray [] = {
0x00, 0x41, 0x25, 0x91, 0x47,
};

then
SPI.transfer(fontArray[2]); // looks up 3rd element in the array (array index starts at 0),
so 0x25 in this example

Your example doesn't do anything, and I don't understand it enough to make it work. Can you perhaps explain it a bit more?

Your code will periodically send data to the MAX7219 registers, which then get multiplexed onto the display.

To send the data, you can call this:

// do an update
for (x=1; x<9; x=x+1){
digitalWrite (ssPin, LOW);
SPI.transfer(x); // send data register address, 1 to 8
SPI.transfer (dataArray[x-1]); // arrays are indexed starting at 0
digitalWrite (ssPin, HIGH);
}

This will put 8 bytes of data into 8 data registers for display.
There 4 or 5 control registers, you will set them up with data the same way in setup() as they only need to run once. See Table 2 in the data sheet:
shutdown register - set to normal mode
no-decode mode - your data is used as is
lamp-test - can turn on & then off to make all LEDs flash once
intensity - sets brightness of the LEDs
scan limit - how many columns (digits) are being used - for an 8x8 matrix, set for 8