   isInputting = false;
 
   currentMillis = millis();
-  Serial.begin(baudRate);
+  //Serial.begin(baudRate);
   isConnected = false;
   disconnectCalled = currentMillis;
   serial_rx_buffer_disconnect[8] = (byte)((disconnectCalled & 0xFF));

unsigned int motorArray[] = {leftMotor, rightMotor, analogLed};

void setup() {

  int powerRelayDelay = 133;
  int powerRelayCounter = 3;
  pinMode(relayPin, OUTPUT);
  pinMode(buttonAnalog, OUTPUT);
  digitalWrite(buttonAnalog, HIGH);
  for (int relayCounter = 0; relayCounter < powerRelayCounter; relayCounter++)
  {
    delay(powerRelayDelay);
    digitalWrite(buttonAnalog, LOW);
    delay(powerRelayDelay);
    digitalWrite(buttonAnalog, HIGH);
  }
  for (int relayCounter = 0; relayCounter < powerRelayCounter; relayCounter++)
  {
    delay(powerRelayDelay);
    digitalWrite(relayPin, HIGH);
    delay(powerRelayDelay);
    digitalWrite(relayPin, LOW);
  }
  for (int relayCounter = 0; relayCounter < powerRelayCounter; relayCounter++)
  {
    delay(powerRelayDelay);
    digitalWrite(buttonAnalog, LOW);
    delay(powerRelayDelay);
    digitalWrite(buttonAnalog, HIGH);
  }
  digitalWrite(buttonAnalog, HIGH);

  serial_rx_buffer_toggle_controller_pwr[0] = 0x17;
  serial_rx_buffer_toggle_controller_pwr[1] = 0x00;


  changeReadMotorsStatus();
  changeAutoResetControllerData();

  digitalWrite(buttonAnalog, HIGH);
  delay(powerRelayDelay);
  digitalWrite(buttonAnalog, LOW);
  delay(powerRelayDelay);
  digitalWrite(buttonAnalog, HIGH);

  readMotors();
  if (analogLedVal > 108)
  {
    Serial.println("Analog is OFF");
  }
  if (analogLedVal < 80)
  {
    Serial.println("Analog is OFF");
  }
  if ((analogLedVal >= 80) && (analogLedVal <= 87))
  {
    Serial.println("Analog is ON");
    delay(powerRelayDelay);
    digitalWrite(buttonAnalog, LOW);
    delay(powerRelayDelay);
    digitalWrite(buttonAnalog, HIGH);
    digitalWrite(relayPin, LOW);
    delay(powerRelayDelay);
    digitalWrite(relayPin, HIGH);
  }
  /*
  digitalWrite(buttonAnalog, HIGH);
  delay(powerRelayDelay);
  digitalWrite(buttonAnalog, LOW);
  delay(powerRelayDelay);
  digitalWrite(buttonAnalog, HIGH);
  */
  readMotors();
  if (analogLedVal > 108)
  {
    Serial.println("Analog is OFF");
  }
  if (analogLedVal < 80)
  {
    Serial.println("Analog is OFF");
  }
  if ((analogLedVal >= 80) && (analogLedVal <= 87))
  {
    Serial.println("Analog is ON");
    delay(powerRelayDelay);
    digitalWrite(buttonAnalog, LOW);
    delay(powerRelayDelay);
    digitalWrite(buttonAnalog, HIGH);
    digitalWrite(relayPin, LOW);
    delay(powerRelayDelay);
    digitalWrite(relayPin, HIGH);
  }
  readMotors();

  //Serial.println("END OF SETUP");
  //  And we are ready to go
  //digitalWrite(relayPin, HIGH);
  //digitalWrite(buttonAnalog, HIGH);
  /*
    for (int relayCounter = 0; relayCounter < powerRelayCounter; relayCounter++)
    {
    delay(powerRelayDelay);
    digitalWrite(buttonAnalog, LOW);
    delay(powerRelayDelay);
    digitalWrite(buttonAnalog, HIGH);
    }
    for (int relayCounter = 0; relayCounter < powerRelayCounter; relayCounter++)
    {
    delay(powerRelayDelay);
    digitalWrite(relayPin, LOW);
    delay(powerRelayDelay);
    digitalWrite(relayPin, HIGH);
    }
    for (int relayCounter = 0; relayCounter < powerRelayCounter; relayCounter++)
    {
    delay(powerRelayDelay);
    digitalWrite(buttonAnalog, LOW);
    delay(powerRelayDelay);
    digitalWrite(buttonAnalog, HIGH);
    }
    digitalWrite(buttonAnalog, HIGH);
  */

  //Serial.print("analogLedVal=");
  //Serial.println(analogLedVal);
  readMotors();
  if (analogLedVal > 108)
  {
    Serial.println("Analog is OFF");
  }
  if (analogLedVal < 80)
  {
    Serial.println("Analog is OFF");
  }
  if ((analogLedVal >= 80) && (analogLedVal <= 87))
  {
    Serial.println("Analog is ON");
    delay(powerRelayDelay);
    digitalWrite(buttonAnalog, LOW);
    delay(powerRelayDelay);
    digitalWrite(buttonAnalog, HIGH);
    digitalWrite(relayPin, LOW);
    delay(powerRelayDelay);
    digitalWrite(relayPin, HIGH);
  }
  /*
  digitalWrite(buttonAnalog, HIGH);
  delay(powerRelayDelay);
  digitalWrite(buttonAnalog, LOW);
  delay(powerRelayDelay);
  digitalWrite(buttonAnalog, HIGH);
  */
  readMotors();
  if (analogLedVal > 108)
  {
    Serial.println("Analog is OFF");
  }
  if (analogLedVal < 80)
  {
    Serial.println("Analog is OFF");
  }
  if ((analogLedVal >= 80) && (analogLedVal <= 87))
  {
    Serial.println("Analog is ON");
    delay(powerRelayDelay);
    digitalWrite(buttonAnalog, LOW);
    delay(powerRelayDelay);
    digitalWrite(buttonAnalog, HIGH);
    digitalWrite(relayPin, LOW);
    delay(powerRelayDelay);
    digitalWrite(relayPin, HIGH);
  }
  readMotors();
  // Why twice? To make sure the analog is unpressed (depressed?) before the controller even connects back to the PS2
  digitalWrite(buttonAnalog, HIGH);
  digitalWrite(relayPin, HIGH);
  digitalWrite(buttonAnalog, HIGH);
  digitalWrite(relayPin, HIGH);
  //Serial.print("analogLedVal=");
  //Serial.println(analogLedVal);
}
