   }
   //void step(double times) {}
   void testSpin(int amount) {
-    Serial.println(amount);
     if(amount > 0)
       dw(dirPin, LOW);
     else
       dw(dirPin, HIGH);
+    prevpos = pos;
+    pos += (amount / 80);
     update = true;
     command.pin = stepPin;
     command.times = abs(amount);

/*
 * Gets user serial input to be put into the parseGCode() function.
 */
void getSerialInput() {
  if(Serial.available() > 0) {
    serialStr = Serial.readString();
    serialStr.trim();
    if(Serial.read() == -1) {
      Serial.println(serialStr);
      if(!parseGCode(serialStr))
        Serial.println("Invalid GCode entered!");
    }
  }
}

void initLCD() {


  lcd.clear();
  lcd.setCursor(0, 0);

  lcd.print("X: ");
  lcd.print(globalPos.x);

  lcd.setCursor(0, 1);

  lcd.print("Y: ");
  lcd.print(globalPos.y);
}

int updateLCD() {
  if(sX.prevpos == globalPos.x || sY.prevpos == globalPos.y) {
    return -1;
  }

  lcd.clear();
  lcd.setCursor(0, 0);

  lcd.print("X: ");
  lcd.print(globalPos.x);

  lcd.setCursor(0, 1);

  lcd.print("Y: ");
  lcd.print(globalPos.y);

  return 0;
}

void updatePos() {
  globalPos.x = sX.pos;
  globalPos.y = sY.pos;

  updateLCD();
}

void setup() {
