 
 #define USE_SERIAL Serial
 
-String row =""; 
+String row = "";
 
-const char* ssid     = "HackBulgaria";
-const char* password = "";
+const char* ssid     = "Vinyl's Mobile Den";
+const char* password = "DJ PON3 is on tour";
 
-const char* host = "10.0.203.231";
+const char* host = "192.168.43.47";
 const char* streamId   = "....................";
 const char* privateKey = "....................";
 
-float G[3] = {0.0, 0.0, 0.0};
+float G[3];
 float alpha = 0.9;
 
 long timer_read_from_accel = 0;

  client.print(tsData.length());
  client.print("\r\n\r\n");
  client.print(tsData);
  client.print("Connection: close\r\n\r\n");

if (millis() - 200 >= timer_send_data_wifi) {
 timer_send_data_wifi = 0;
 
row = "";
  // Read all the lines of the reply from server and print them to Serial
  //  while(client.available()){
  //    String line = client.readStringUntil('\r');
  //    Serial.print(line);
  //  }

  //  Serial.println();
  //  Serial.println("closing connection");
  }
}


  }


  if (millis() - 20 >= timer_read_from_accel) {
    //Serial.println(timer_read_from_accel);
    timer_read_from_accel = millis();
    accel.read();//This function gets new data from the accelerometer
//Serial.println("\\/RAW DATA \\/");
//Serial.println(String(accel.X) + "," + String(accel.Y) + "," + String(accel.Z));
//Serial.println("/\\RAW END /\\");
//    Serial.print(alpha);
//    Serial.print(" ");
//    Serial.print(G[0]);
//    Serial.print(" ");
//    Serial.print(float(accel.X));
    
    
//    G[0] = alpha * G[0] + (1.0 - alpha) * float(accel.X);
//    G[1] = alpha * G[1] + (1.0 - alpha) * float(accel.Y);
//    G[2] = alpha * G[2] + (1.0 - alpha) * float(accel.Z);
    
    
//    Serial.print(" -> ");
//    Serial.println(G[0]);
    
    //char* row;
    //sprintf(row, "%d,%d,%d", accel.X - G[0], accel.Y - G[1], accel.Z - G[2]);
    //Serial.println(G[0]);
    //Serial.println(G[1]);
    //Serial.println(G[2]);
    row += String(accel.X) + "," + String(accel.Y) + "," + String(accel.Z);
//    row += String(float(accel.X) - G[0]) + "," + String(float(accel.Y) - G[1]) + "," + String(float(accel.Z) - G[2]);
//    Serial.println(row);
  }

//  Serial.println(row);
  // We now create a URI for the request
  String url = "/stream";
  String tsData = String(row);
