        // Read.
        int n = client.read(buffer, 15, 1);
        if (n < 0){
-//         Serial.println(F("Error data received..."));
+         Serial.println(F("Error data received..."));
        }
        client.write(buffer,15,1);
        Serial.println(buffer);


#define LISTEN_PORT           18001    // What TCP port to listen on for connections.  The echo protocol uses port 7.

Adafruit_CC3000_Server echoServer(LISTEN_PORT);

// DC motor on M1
AF_DCMotor motor1(1, MOTOR12_1KHZ);
AF_DCMotor motor2(2, MOTOR12_1KHZ);

int inByte;
// initial speed
int speed = 200;

void setup(void)
{
  Serial.begin(9600);
  
  motor1.setSpeed(speed);
  motor2.setSpeed(speed);
  motor1.run(RELEASE);
  motor2.run(RELEASE);
  
  Serial.println(F("Hello, CC3000!\n")); 


  while (! displayConnectionDetails()) {
    delay(1000);
  }
  
  // Start listening for connections
  carServer.begin();
  
  Serial.println(F("Listening for connections..."));
}

void accelerate() {
  motor1.setSpeed(fastSpeed);
  motor2.setSpeed(fastSpeed);
  motor1.run(FORWARD);
  motor2.run(FORWARD);
}

void decelerate() {
  motor1.setSpeed(slowSpeed);
  motor2.setSpeed(slowSpeed);
  motor1.run(BACKWARD);
  motor2.run(BACKWARD);
}

void turnLeft() {
  motor1.setSpeed(slowSpeed);
  motor1.run(FORWARD);
  motor2.run(RELEASE);
}

void turnRight(){
  motor2.setSpeed(slowSpeed);
  motor1.run(RELEASE);
  motor2.run(FORWARD);
}
