 			return;
 		}
 		
-		koira14[buf_i++] = data;
-		if (buf_i == sizeof(koira14)) {
+		buf_back[buf_i++] = data;
+		if (buf_i == sizeof(buf_a)) {
 			buf_i = 0;
+			buf_swap();
 			Serial.write('K');
 		}
         }

#include <SPI.h>
#include <TimerOne.h>

static uint8_t koira14[] = {
	0x01, 0x00, 0x08, 0x04, 0x10, 0x00, 0x0A, 0x04, 0x01, 0x00, 0x08, 0x04,
	0x10, 0x00, 0x08, 0x04, 0x07, 0x07, 0x0B, 0x05, 0x17, 0x03, 0x0A, 0x05,
	0x09, 0x14, 0x18, 0x04, 0x14, 0x04, 0x1A, 0x04, 0x09, 0x17, 0x18, 0x04,
	0x17, 0x04, 0x1A, 0x04, 0x09, 0x07, 0x0B, 0x0D, 0x17, 0x13, 0x0A, 0x1D,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00
};

void setup() {
	// Set output pins for LED display

	digitalWrite(5, LOW);
	
	// Send new data to SPI. Don't wait it to complete
	SPDR = buf_front[8*row_i+col_i];
}
