adafruit / RGB-matrix-Panel

Arduino library and example code for the 16x32 RGB matrix panels in the shop
http://www.adafruit.com/products/420
302 stars 145 forks source link

RGB-matrix-Panel with Feather M0 support #39

Closed ee-quipment closed 6 years ago

ee-quipment commented 6 years ago

With the popularity of the Feather architecture, I'm sure your customers have been asking for RGB matrix support. I've ported the RBGmatrixPanel library to the Feather M0. I did not touch the interface, although the I/O ports are hard-coded and so the port pin assignments in the constructor are ignored.

There is no assembly, just C code with no superhuman attempts at optimization. Max refresh rate is a little slower than the AVR code (156 vs 208 Hz) although the max CPU overhead is only 25% due apparently to plane0 handling being more efficent. The ARM compiler is pretty amazing.

I would also like to add support for the Arduino MKR ZERO but since you made the investment in the driver I won't do that unless you give me express permission.

If you want to test the code yourself, or update the example on your website, I'd be happy to provide you with a built-up adapter board.

If you decide to pull in these changes I will delete the copy on my github repository so we don't confuse people. If you don't want to pull in the changes I will keep them in my repository and you can direct customers to it if you wish.

Jeff Mitchell Principal Architect ee-quipment.com

SCOPE: 1) Adds support for Feather M0 boards All changes are via #ifdef ARDUINO_SAMD_FEATHER_M0. No change to the interface. Pin assignments in the constructor are ignored. SPI and I2C ports are still available. Adds an interrupt handler which pushes pixels directly out the hardware I/O port. Some AVR code #ifdef'd out because it won't compile. Some AVR code left in that isn't used, but doesn't cause problems. 2) Fixes gamma conflict with math.h Put gamma.h array definition inline in .cpp file. Changed gamma to gamma_lut.

LIMITATIONS: 1) I/O port assignements are fixed. SPI and I2C ports are still available, but LED_BUILTIN is used. 2) No regression testing was done on AVR Arduino boards - I don't know if I broke anything.

TEST MATRIX: All Arduino sketches in the RGBmatrixPanel example folders were run successfully with all combinations of the Feather M0 boards and RGB panels listed below (9 total configurations).

A separate test was constructed which ran the radio on the
RFM69 board while driving a panel and an OLED Featherwing (product ID: 2900)
simultaneously, giving confidence that SPI (RFM69) and I2C (OLED) are unaffected.

Feather M0 boards:
    Feather M0 Basic Proto    https://www.adafruit.com/product/2772
    Feather M0 Wifi           https://www.adafruit.com/product/3010
    Feather M0 RFM69HCW       https://www.adafruit.com/product/3176

LED RGB Matrix Panels:
    16x32 P10 panel           https://www.adafruit.com/product/420
    32x32 P4  panel           https://www.adafruit.com/product/607
    64x32 P5  panel           https://www.adafruit.com/product/2277

BONUS: A schematic and an adapter board layout along with a shared board design on OshPark are provided.

ee-quipment commented 6 years ago

I'm new to GitHub, so I'm floundering a bit with the pull request. CAD files, documentation, etc. can be found at https://github.com/ee-quipment/RGB-matrix-Panel-Zero.

marcmerlin commented 6 years ago

Howdy. I can't review this for you (as in I don't have commit access), but this change is unreviewable. What you did was delete the whole file, and then submit a new one. There is no diff to review.

You should use another git client, checkout the source from here, then copy your file over the current one, git diff, make sure you get an actual diff, git submit in your fork, and then send that as a merge request. This merge request will no diff will not be accepted.