Skip to content

Commit 2ab6dd4

Browse files
Minor change to one of the 32x32 examples
1 parent ca3e972 commit 2ab6dd4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/colorwheel_progmem_32x32/colorwheel_progmem_32x32.pde

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ void setup() {
1919
int i, len;
2020
uint8_t *ptr = matrix.backBuffer(); // Get address of matrix data
2121

22-
// Copy each byte from PROGMEM to matrix buffer:
23-
len = sizeof(img);
24-
for(i=0; i<len; i++) ptr[i] = pgm_read_byte(&img[i]);
22+
// Copy image from PROGMEM to matrix buffer:
23+
memcpy_P(ptr, img, sizeof(img));
2524

2625
// Start up matrix AFTER data is copied. The RGBmatrixPanel
2726
// interrupt code ties up about 40% of the CPU time, so starting

0 commit comments

Comments
 (0)