   
   //Interrupts must be disabled while resetting, otherwise bad things happen
   cli();
+  
   //Set all the pins to reverse
   PORTD=B10101000;
   PORTB=B00101010;

  PORTD=portd=portddirection=B00000000;
  PORTB=portb=portbdirection=B00000000;
  PORTC=portc=portcdirection=B00000000;
  sei();
}


        currentPosition[2]++;
      }

      //Pulse the step pin
      if(ebi(portd,2)){
        cbi(portd,2);
      }else{
