Minor update

This commit is contained in:
mrfaptastic 2020-08-14 10:21:31 +01:00
parent d48542d599
commit b504f6292d
5 changed files with 11 additions and 7 deletions

View file

@ -65,9 +65,9 @@ The panel must be powered by 5V AC adapter with enough current capacity. (Curren
# 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>
RGB64x32MatrixPanel_I2S_DMA matrix;

View file

@ -201,10 +201,14 @@ void setup() {
Serial.println("SPIFFS Mount Failed");
}
/* setPanelBrightness should be called before .begin() */
/* setMinRefreshRate must be called before .begin() */
dma_display.setPanelBrightness(32);
dma_display.setMinRefreshRate(200);
dma_display.begin();
/* all other pixel drawing functions can only be called after .begin() */
dma_display.fillScreen(dma_display.color565(0, 0, 0));
gif.begin(LITTLE_ENDIAN_PIXELS);

View file

@ -133,9 +133,8 @@ void setup() {
/************** 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 ); // setup the LED matrix
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.fillScreen(display.color444(0, 1, 0));
// Fade a Red Wifi Logo In

View file

@ -14,7 +14,8 @@ void setup()
delay(1000); Serial.begin(115200); delay(200);
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));

View file

@ -15,7 +15,7 @@ void setup() {
Serial.println(" HELLO !");
Serial.println("*****************************************************");
dma_display.begin();
dma_display.begin(); // use default pins
// draw a pixel in solid white
dma_display.drawPixel(0, 0, dma_display.color444(15, 15, 15));