Max72XX is a library for driving arrays of MAX72XX as a pixel device.
Add the library to your mix.exs deps:
def deps do
[
{:max_72xx, "~> 0.1.0"}
]
end
Run mix deps.get to download the new dependency.
-
Connect the array to the SPI (There are many guides on Internet)
-
Start the driver
{:ok, ref} <- Max72XX.Array.start_link("spidev0.0", 4)
- Draw pixels and update the matrix
Max72XX.Array.set_pixel(ref, x, y)
...
Max72XX.Array.update(ref)