Skip to content

Commit 32a6614

Browse files
authored
Add a clear() method to the LED matrix library
1 parent fb0f853 commit 32a6614

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

libraries/Arduino_LED_Matrix/src/Arduino_LED_Matrix.h

+10
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,16 @@ class ArduinoLEDMatrix
248248
_callBack = callBack;
249249
}
250250

251+
void clear() {
252+
const uint32_t fullOff[] = {
253+
0x00000000,
254+
0x00000000,
255+
0x00000000
256+
};
257+
loadFrame(fullOff);
258+
}
259+
260+
251261
#ifdef MATRIX_WITH_ARDUINOGRAPHICS
252262
virtual void set(int x, int y, uint8_t r, uint8_t g, uint8_t b) {
253263
if (y >= canvasHeight || x >= canvasWidth || y < 0 || x < 0) {

0 commit comments

Comments
 (0)