Minor update
This commit is contained in:
parent
d48542d599
commit
b504f6292d
5 changed files with 11 additions and 7 deletions
|
@ -65,9 +65,9 @@ The panel must be powered by 5V AC adapter with enough current capacity. (Curren
|
||||||
|
|
||||||
# How to Use
|
# How to Use
|
||||||
|
|
||||||
Below is a bare minimum sketch to draw a single white dot in the top left. You MUST call .begin() before you call ANY other function of the RGB64x32MatrixPanel_I2S_DMA class!
|
Below is a bare minimum sketch to draw a single white dot in the top left. You must call .begin() before you call ANY pixel-drawing (fonts, lines, colours etc.) function of the RGB64x32MatrixPanel_I2S_DMA class.
|
||||||
|
|
||||||
No call to .begin() before use = Crash
|
No .begin() before other functions = Crash
|
||||||
```
|
```
|
||||||
#include <ESP32-RGB64x32MatrixPanel-I2S-DMA.h>
|
#include <ESP32-RGB64x32MatrixPanel-I2S-DMA.h>
|
||||||
RGB64x32MatrixPanel_I2S_DMA matrix;
|
RGB64x32MatrixPanel_I2S_DMA matrix;
|
||||||
|
|
|
@ -201,10 +201,14 @@ void setup() {
|
||||||
Serial.println("SPIFFS Mount Failed");
|
Serial.println("SPIFFS Mount Failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* setPanelBrightness should be called before .begin() */
|
||||||
|
/* setMinRefreshRate must be called before .begin() */
|
||||||
dma_display.setPanelBrightness(32);
|
dma_display.setPanelBrightness(32);
|
||||||
dma_display.setMinRefreshRate(200);
|
dma_display.setMinRefreshRate(200);
|
||||||
|
|
||||||
dma_display.begin();
|
dma_display.begin();
|
||||||
|
|
||||||
|
/* all other pixel drawing functions can only be called after .begin() */
|
||||||
dma_display.fillScreen(dma_display.color565(0, 0, 0));
|
dma_display.fillScreen(dma_display.color565(0, 0, 0));
|
||||||
gif.begin(LITTLE_ENDIAN_PIXELS);
|
gif.begin(LITTLE_ENDIAN_PIXELS);
|
||||||
|
|
||||||
|
|
|
@ -133,8 +133,7 @@ void setup() {
|
||||||
|
|
||||||
/************** DISPLAY **************/
|
/************** DISPLAY **************/
|
||||||
Sprintln("...Starting Display");
|
Sprintln("...Starting Display");
|
||||||
display.setPanelBrightness(48);
|
display.begin(R1_PIN, G1_PIN, B1_PIN, R2_PIN, G2_PIN, B2_PIN, A_PIN, B_PIN, C_PIN, D_PIN, E_PIN, LAT_PIN, OE_PIN, CLK_PIN );
|
||||||
display.begin(R1_PIN, G1_PIN, B1_PIN, R2_PIN, G2_PIN, B2_PIN, A_PIN, B_PIN, C_PIN, D_PIN, E_PIN, LAT_PIN, OE_PIN, CLK_PIN ); // setup the LED matrix
|
|
||||||
|
|
||||||
display.fillScreen(display.color444(0, 1, 0));
|
display.fillScreen(display.color444(0, 1, 0));
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,8 @@ void setup()
|
||||||
delay(1000); Serial.begin(115200); delay(200);
|
delay(1000); Serial.begin(115200); delay(200);
|
||||||
|
|
||||||
Serial.println("...Starting Display");
|
Serial.println("...Starting Display");
|
||||||
display.begin(); // setup the display with no double buffering
|
|
||||||
|
display.begin(); // setup display with pins as per defined in the library
|
||||||
display.setTextColor(display.color565(128, 128, 128));
|
display.setTextColor(display.color565(128, 128, 128));
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ void setup() {
|
||||||
Serial.println(" HELLO !");
|
Serial.println(" HELLO !");
|
||||||
Serial.println("*****************************************************");
|
Serial.println("*****************************************************");
|
||||||
|
|
||||||
dma_display.begin();
|
dma_display.begin(); // use default pins
|
||||||
|
|
||||||
// draw a pixel in solid white
|
// draw a pixel in solid white
|
||||||
dma_display.drawPixel(0, 0, dma_display.color444(15, 15, 15));
|
dma_display.drawPixel(0, 0, dma_display.color444(15, 15, 15));
|
||||||
|
|
Loading…
Reference in a new issue