       Serial.println("read starting");
       
     // Throw out first bit
-    digitalWrite(startPin, HIGH);
-    digitalWrite(startPin, LOW);
+    digitalWrite(STARTPIN, HIGH);
+    digitalWrite(STARTPIN, LOW);
     
-    delayMicroseconds(5);
+    //delayMicroseconds(5);
     
-    while(digitalRead(busyPin)) {}
+    while(digitalRead(BUSYPIN)) {}
     
-    delayMicroseconds(5);
-    
-    int toread = 512;
-    if (DEBUG)
-      toread = 4;
+    //delayMicroseconds(5);
     
     for (int j = 0; j < toread*2; j++) {
       

int startPin = 2;
int busyPin = 3;
int clockPin = 13;
int dataPin = 12;

byte clr;

void setup() {
  pinMode(startPin, OUTPUT);
  pinMode(busyPin, INPUT);
  pinMode(clockPin, OUTPUT);
  pinMode(dataPin, INPUT);
  pinMode(10, OUTPUT);
  
  // SPCR = 01010000

  return SPDR;                    // return the received byte
}

void loop() {
  boolean tostart = DEBUG;
  if (!DEBUG && Serial.available() > 0) {
