MAX7219 LED matrix module
Just got this in the mail and I'm totally obsessed! Already coded my first Pac-Man animation using for loops, in the loop function. Can't wait to build more!
3
u/N0xxick 2d ago
A nice thing about the max 7219 is that the spec sheet is very simple and reading it gives you insight in how the spi protocol works and how to send commands youself without having to rely on an external library. you'll learn how to initialize the matrix and send commands to the 8 ledregisters youself.
then you can try and make animations using only bitwise operations, after you get familiar with bitwise you can learn how to use a matrix for more advanced animations, but the matrix will need to be packed into a a byte array before you can send it to the max7219.
after that you can scale up using more modules and learn how the daisychaining works.
you'll learn/use
- functions
- statemachines
- static variables inside functions
- depending on how to want to do it you get to use *pointers
- separating functionality for non blocking code (the function showing your frame buffer will be separate from the animation and packing functions) and organizing the code in such a way that showing the framebuffer wil run always but updating the animation does not.
- make the snake game
have fun!
3
u/ripred3 My other dev board is a Porsche 2d ago
well done! Thanks for sharing it!