π
2017-04-24 01:01
in Arduino
Give me code:
https://github.com/marcmerlin/Adafruit_NeoMatrix/tree/master/examples/MatrixGFXDemo
https://github.com/marcmerlin/RGB-matrix-Panel/tree/master/examples/PanelGFXDemo
FastLED Version https://github.com/marcmerlin/FastLED_NeoMatrix/blob/master/examples/MatrixGFXDemo/MatrixGFXDemo.ino
Note that the last link uses my https://github.com/marcmerlin/FastLED_NeoMatrix library which ports NeoMatrix to the better FastLED backend. The nice thing though is that all your code keeps working just the same, no changes required outside of matrix initialization. I wrote a different page for my FastLED::NeoMatrix library.
Soon afer, I dug up my Adafruit 16X32 RGB LED Matrix Panel, setup an old Arduino Mega to control it and have enough RAM left to run some fun code (on an Uno memory would have been too tight), it turns out that thanks to Adafruit GFX support, it took very little time to get my same demo working on the RGB Panel. Here is a video of the demo I wrote on all those different displays:
Here are some things the demo does:
Init displays the same 8x8 pattern as many times as it will fit
The code will then draw lines, rectangles and circles that match the size of the display:
If the display is at least 16x8, it will display the resolution in various ways appropriate to the display size:
another part of the demo displays an 8x8 color pixmap with drawRGBBitmap I added in Adafruit-GFX-Library and bounces it around on any display bigger than 10x10:
then, it will display a 24x24 bitmap which on most displays will be panned around to show the whole picture:
Hope you enjoy the demo, it should work pretty trivially on any display that supports Adafruit::GFX, see https://github.com/marcmerlin/RGB-matrix-Panel/blob/master/examples/PanelGFXDemo/PanelGFXDemo.ino#L21 on how some backend specific code can be #define'd to work on other backends.
All the displays, 4 made with neopixels and soldered by hand
Yeah, the 24x24 one took forever to lay out, glue and solder (6H+)
2 row scanned matrices on the upper left, 7x7 neomatrix, another row scanned 32x16 Adafruit panel.
on the bottom row, self built 16x8 neomatrix, and another 12x12 neomatrix
Soon afer, I dug up my Adafruit 16X32 RGB LED Matrix Panel, setup an old Arduino Mega to control it and have enough RAM left to run some fun code (on an Uno memory would have been too tight), it turns out that thanks to Adafruit GFX support, it took very little time to get my same demo working on the RGB Panel. Here is a video of the demo I wrote on all those different displays:
See more images for Adafruit GFX on NeoMatrix and RGB Matrix Panel Demo