ESP32-HUB75-MatrixPanel-DMA/examples/ChainedPanels/README.md

51 lines
2 KiB
Markdown
Raw Normal View History

2020-08-02 23:49:29 +02:00
## Chained Panels example - Chaining individual LED matrix panels to make a larger panel ##
2020-08-02 23:47:02 +02:00
2020-08-02 23:49:29 +02:00
This is the PatternPlasma Demo adopted for use with multiple
displays arranged in a non standard order
2020-08-02 23:47:02 +02:00
2020-08-02 23:49:29 +02:00
### What is a non standard order? ###
2020-08-02 23:47:02 +02:00
2020-08-02 23:49:29 +02:00
When you connect multiple panels together, the library treats the
multiple panels as one big panel arranged horizontally. Arranging
the displays like this would be a standard order.
2020-08-03 10:56:54 +02:00
```
2020-08-02 23:49:29 +02:00
[ 4 ][ 3 ][ 2 ][ 1 ] (ESP32 is connected to 1)
2020-08-03 10:56:54 +02:00
```
2020-08-02 23:47:02 +02:00
2020-08-02 23:49:29 +02:00
If you wanted to arrange the displays vertically, or in rows and
columns this example might be able to help.
2020-08-03 10:56:54 +02:00
```
2020-08-02 23:49:29 +02:00
[ 4 ][ 3 ]
[ 2 ][ 1 ]
2020-08-03 10:56:54 +02:00
```
2020-08-02 23:49:29 +02:00
It creates a virtual screen that you draw to in the same way you would
the matrix, but it will look after mapping it back to the displays.
2020-08-02 23:47:02 +02:00
2020-08-03 13:40:19 +02:00
![Nothing better than a PowerPoint slide to explain](VirtualDisplay.png)
2020-08-02 23:47:02 +02:00
### Steps to Use ###
2020-08-02 23:49:29 +02:00
1) In ESP32-RGB64x32MatrixPanel-I2S-DMA.h:
- Set the MATRIX_HEIGHT to be the y resolution of the physical chained panels in a line (if the panels are 32 x 16, set it to be 16)
- Set the MATRIX_WIDTH to be the sum of the x resolution of all the physical chained panels (i.e. If you have 4 x (32px w x 16px h) panels, 32x4 = 128)
2020-08-02 23:47:02 +02:00
2020-08-02 23:49:29 +02:00
2) In the sketch:
2020-08-02 23:47:02 +02:00
2020-08-02 23:49:29 +02:00
- Set values for NUM_ROWS, NUM_COLS, PANEL_RES_X, PANEL_RES_Y. There are comments beside them
explaining what they are in more detail.
- Other than where the matrix is defined and matrix.begin in the setup, you should now be using the virtual display
for everything (drawing pixels, writing text etc). You can do a find and replace of all calls if it's an existing sketch
(just make sure you don't replace the definition and the matrix.begin)
- If the sketch makes use of MATRIX_HEIGHT or MATRIX_WIDTH, these will need to be replaced with the width and height
of your virtual screen. Either make new defines and use that, or you can use virtualDisp.width() or .height()
2020-08-02 23:47:02 +02:00
#### Contributor ####
2020-08-02 23:49:29 +02:00
Written by Brian Lough
YouTube: https://www.youtube.com/brianlough
2020-08-02 23:50:55 +02:00
2020-08-02 23:49:29 +02:00
Tindie: https://www.tindie.com/stores/brianlough/
2020-08-02 23:50:55 +02:00
2020-08-02 23:49:29 +02:00
Twitter: https://twitter.com/witnessmenow