aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrfaptastic <12006953+mrfaptastic@users.noreply.github.com>2020-08-14 10:02:58 +0100
committerGitHub <noreply@github.com>2020-08-14 10:02:58 +0100
commitd35f4a44f1aa7004ec08817c1a74ecb984ec43f3 (patch)
tree45f703f13a1dc4677f82a63e4018692b97c03d1f
parent5d7947608f255ad5648cff2eb2f4dc8af37bfcf0 (diff)
Update README.md
-rw-r--r--README.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/README.md b/README.md
index dc80cca..c6b77d0 100644
--- a/README.md
+++ b/README.md
@@ -63,6 +63,35 @@ display.begin(R1_PIN, G1_PIN, B1_PIN, R2_PIN, G2_PIN, B2_PIN, A_PIN, B_PIN, C_PI
The panel must be powered by 5V AC adapter with enough current capacity. (Current varies due to how many LED are turned on at the same time. To drive all the LEDs, you need 5V4A adapter.)
+# 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!
+
+No call to .begin() before use = Crash
+
+```
+
+/* -------------------------- Class Initialisation -------------------------- */
+#include <ESP32-RGB64x32MatrixPanel-I2S-DMA.h>
+RGB64x32MatrixPanel_I2S_DMA matrix;
+
+void setup()
+{
+ // MUST DO THIS FIRST!
+ matrix.begin(); // Use default pins supplied within ESP32-RGB64x32MatrixPanel-I2S-DMA.h
+ // matrix.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 ); // or custom pins
+
+ // Draw a single white pixel
+ matrix.drawPixel(0,0, matrix.color565(255,255,255)); // can do this now after .begin() only
+
+}
+
+void loop()
+{
+}
+
+```
+
## Can I chain panels or use with larger panels?