Skip to content

Commit ffd19c0

Browse files
alraneldelta-G
authored andcommitted
Add a clear() method to the LED matrix library
1 parent 1a6bbde commit ffd19c0

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,16 @@ class ArduinoLEDMatrix
253253
_callBack = callBack;
254254
}
255255

256+
void clear() {
257+
const uint32_t fullOff[] = {
258+
0x00000000,
259+
0x00000000,
260+
0x00000000
261+
};
262+
loadFrame(fullOff);
263+
}
264+
265+
256266
#ifdef MATRIX_WITH_ARDUINOGRAPHICS
257267
virtual void set(int x, int y, uint8_t r, uint8_t g, uint8_t b) {
258268
if (y >= canvasHeight || x >= canvasWidth || y < 0 || x < 0) {

0 commit comments

Comments
 (0)