 int num_files;
 
 void screenClearCallback(void) {
+#if (USE_SMARTMATRIX == 1)
   backgroundLayer.fillScreen({0,0,0});
+#endif
 }
 
 void updateScreenCallback(void) {
+#if (USE_SMARTMATRIX == 1)
   backgroundLayer.swapBuffers();
+#endif
 }
 
 void drawPixelCallback(int16_t x, int16_t y, uint8_t red, uint8_t green, uint8_t blue) {
-  backgroundLayer.drawPixel(x, y, {red, green, blue});
+#if (USE_SMARTMATRIX == 1)
+    backgroundLayer.drawPixel(x, y, {red, green, blue});
+#endif
 }
 
 // Setup method runs once, when the sketch starts

    // Clear screen
    backgroundLayer.fillScreen(COLOR_BLACK);
    backgroundLayer.swapBuffers(false);

    if(initSdCard(SD_CS) < 0) {
#if ENABLE_SCROLLING == 1
        scrollingLayer.start("No SD card", -1);
#endif
        Serial.println("No SD card");

    Serial.println("Starting AnimatedGIFs Sketch");


#if (USE_SMARTMATRIX == 1)
    // Initialize matrix
    matrix.addLayer(&backgroundLayer); 
#if (ENABLE_SCROLLING == 1)
    matrix.addLayer(&scrollingLayer); 
#endif

