From b504f6292de8a07f155d42f650e535ef901754c6 Mon Sep 17 00:00:00 2001 From: mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> Date: Fri, 14 Aug 2020 10:21:31 +0100 Subject: [PATCH] Minor update --- README.md | 4 ++-- examples/AnimatedGIFPanel/AnimatedGIFPanel.ino | 4 ++++ examples/BitmapIcons/BitmapIcons.ino | 5 ++--- examples/BufferSwap/BufferSwap.ino | 3 ++- examples/testshapes_32x64/testshapes_32x64.ino | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b4c1194..b03abb1 100644 --- a/README.md +++ b/README.md @@ -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 RGB64x32MatrixPanel_I2S_DMA matrix; diff --git a/examples/AnimatedGIFPanel/AnimatedGIFPanel.ino b/examples/AnimatedGIFPanel/AnimatedGIFPanel.ino index d4db9bf..8f4abb1 100644 --- a/examples/AnimatedGIFPanel/AnimatedGIFPanel.ino +++ b/examples/AnimatedGIFPanel/AnimatedGIFPanel.ino @@ -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); diff --git a/examples/BitmapIcons/BitmapIcons.ino b/examples/BitmapIcons/BitmapIcons.ino index a2f2331..72328c5 100644 --- a/examples/BitmapIcons/BitmapIcons.ino +++ b/examples/BitmapIcons/BitmapIcons.ino @@ -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 diff --git a/examples/BufferSwap/BufferSwap.ino b/examples/BufferSwap/BufferSwap.ino index 7b0e383..a797937 100644 --- a/examples/BufferSwap/BufferSwap.ino +++ b/examples/BufferSwap/BufferSwap.ino @@ -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)); diff --git a/examples/testshapes_32x64/testshapes_32x64.ino b/examples/testshapes_32x64/testshapes_32x64.ino index b09bfad..0960942 100644 --- a/examples/testshapes_32x64/testshapes_32x64.ino +++ b/examples/testshapes_32x64/testshapes_32x64.ino @@ -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));