 int yDir; //Direction Y should move
 int rDir; //Direction R should move
 
-bool userControl = false; //Enable or disable user buttons
-int inputError = 0; //4 bit binary error check 
+bool userControl = false; //Enable or disable user turn
 
 // Setup  /////////////////////////////////////////////////////////////////////////////////
 

  
}

void RequestPCInstruction()
{
  
  Serial.println(inputError); //Inform PC if any inputs are invlaid
  inputError = 0;  

}

void UserButton1() //Tell machine to move out of the way
{
  
  if (userControl)
  {
    if(requestedX != 0) requestedX = 0;
    else requestedX = UPPERBOUND_X - 1;
  }
  
}

void UserButton2() //Tell machine to take another turn
{

  if (userControl)
  {
    requestedX = currentX;
    userControl = false;
  }
   
}

///////////////////////////////////////////////////////////////////////////////////////////

    count++;
    delay(10);
  } while(count != sizeof(readline) && Serial.available() > 0);

  val = atoi(strtok(readline, DELIMITER));
  if (val == 170)
  { 
    val = atoi(strtok(NULL, DELIMITER));
    if (val < 0) requestedX = 0; 
    else if (val >= UPPERBOUND_X) rewuestedX = UPPERBOUND_X - 1;
    else requestedX = val;
    val = atoi(strtok(NULL, DELIMITER));
    if (val < 0) requestedY = 0; 
    else if (val >= UPPERBOUND_Y) rewuestedY = UPPERBOUND_Y - 1;
    else requestedY = val;
    val = atoi(strtok(NULL, DELIMITER));
    if (val < 0) requestedR = 0; 
    else if (val >= UPPERBOUND_R) requestedR = UPPERBOUND_R - 1;
    else requestedR = val;
    val = atoi(strtok(NULL, ENDCHAR));
    if (val < 0) requestedE = 0; 
    else if (val >= UPPERBOUND_E) rewuestedE = UPPERBOUND_E - 1;
    else requestedX = val;
  }
 
  memset(&readline[0], 0, sizeof(readline)); 

  Serial.println("200");
  
}

