Skip to content

Cascading Matrices #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Dec 15, 2021
Merged

Conversation

FlantasticDan
Copy link
Contributor

The MAX7219 supports chaining multiple chips in series, this pull request adds support for that functionality and implements a class for a chain of 8x8 LED matrices.

adafruit_max7219.max7219.ChainableMAX7219

Adds chainable support by modifying this RPi Pico MicroPython implementation to work as a subclass of max7219 in the CircuitPython ecosystem.

adafruit_max7219.matrices.CustomMatrix

A feature matched adafruit_max7219.matrices.Matrix8x8 that allows for displays of any rectangular configuration of 8x8 LED matrices by implementing ChainableMAX7219 and modifying relevant parts of the underlying adafruit_framebuf dependency.

Hardware

I don't believe Adafruit carries any multi-panel 8x8 LED Matrices (yet...), but they are abundant and affordable on Amazon. I've been using this one.

Wiring

All LED Matrices need to be oriented the same way, and their driving MAX7219 chips should be chained left to right, top to bottom. So if there are multiple rows, the last chip of the first row is chained to the first chip of the second row.

Coordinate System

The top left pixel of the display is (0, 0). The x value increases from left to right while the y value increases from top to bottom.

Demos

examples/max7219_custommatrixtest.py is a modified version of examples/max7219_simpletest.py for a set of 4 8x8 LED Matrices arranged as a single 32x8 display:
32x8 MAX7219 Matrix Demo

It's also possible to create displays with multiple rows of matrices:
32x16 MAX7219 Matrix Demo

@FoamyGuy
Copy link
Contributor

Thanks @FlantasticDan for all of your work on this. I have hardware on the way to test this out hopefully within a week or two.

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @FlantasticDan

multi_max7219.mp4

These changes look good to me. Tested successfully on

Adafruit CircuitPython 7.2.0-alpha.0 on 2021-12-03; Adafruit Feather RP2040 with rp2040
Board ID:adafruit_feather_rp2040

@FoamyGuy FoamyGuy merged commit 0a64fe0 into adafruit:main Dec 15, 2021
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 15, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_MAX7219 to 1.5.0 from 1.4.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_MAX7219#37 from FlantasticDan/chainable-matrices
  > update rtd py version

Updating https://github.com/adafruit/Adafruit_CircuitPython_PyBadger to 3.6.1 from 3.6.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_PyBadger#56 from FoamyGuy/rename_mag_tag
  > Merge pull request adafruit/Adafruit_CircuitPython_PyBadger#54 from FoamyGuy/pybadge_lc_compatibility
  > update rtd py version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants