   delay(ANIM_DELAY);
 
   if( x > LEDMATRIX_WIDTH )
-    x= -1;
+    x = -SEGMENT_WIDTH;
 }
 
 void drawSprite( byte* sprite, int x, int y, int width, int height )

void setup() {
  // init the display
  lmd.setEnabled(true);
  lmd.setIntensity(2);   // 0 = low, 10 = high
}

int x=-1, y=0;   // start top left
bool s = true;  // start with led on

byte a[8]={ B00011000,
            B00100100,


// Number of 8x8 segments you are connecting
const int LEDMATRIX_SEGMENTS = 4;
const int SEGMENT_WIDTH = 8;
const int LEDMATRIX_WIDTH    = LEDMATRIX_SEGMENTS * SEGMENT_WIDTH;

// The LEDMatrixDriver class instance
LEDMatrixDriver lmd(LEDMATRIX_SEGMENTS, LEDMATRIX_CS_PIN);
