// Example sketch which shows how to display some patterns // on a 64x32 LED matrix // #include /* * Below is an example of the 'legacy' way of initialising the MatrixPanel_I2S_DMA class. * i.e. Matrix Width and Height will need to be confirmed as compile-time directives. * By default the library assumes a single 64x32 pixel panel is connected. * * Refer to the example '2_PatternPlasma' on the new / correct way to setup this library * for different resolutions / panel chain lengths. * */ MatrixPanel_I2S_DMA dma_display; // Or use an Alternative non-DMA library, i.e: //#include //P3RGB64x32MatrixPanel display; // Input a value 0 to 255 to get a color value. // The colours are a transition r - g - b - back to r. // From: https://gist.github.com/davidegironi/3144efdc6d67e5df55438cc3cba613c8 uint16_t colorWheel(uint8_t pos) { if(pos < 85) { return dma_display.color565(pos * 3, 255 - pos * 3, 0); } else if(pos < 170) { pos -= 85; return dma_display.color565(255 - pos * 3, 0, pos * 3); } else { pos -= 170; return dma_display.color565(0, pos * 3, 255 - pos * 3); } } void drawText(int colorWheelOffset) { // draw text with a rotating colour dma_display.setTextSize(1); // size 1 == 8 pixels high dma_display.setTextWrap(false); // Don't wrap at end of line - will do ourselves dma_display.setCursor(5, 0); // start at top left, with 8 pixel of spacing uint8_t w = 0; const char *str = "ESP32 DMA"; for (w=0; w