   //  Serial.println(url);
 
 
+if (millis() - 200 >= timer_send_data_wifi) {
+    timer_send_data_wifi = 0;
 
   // This will send the request to the server
   client.print(String("POST ") + url + " HTTP/1.1\r\n" + "Host: " + host + "\r\n");

void setup() {
  Serial.begin(115200);
  delay(10);


  Serial.begin(9600);
  Wire.begin(2, 14);
  accel.begin(BMA250_range_2g, BMA250_update_time_4ms);//This sets up the BMA250 accelerometer
  USE_SERIAL.begin(115200);
  // USE_SERIAL.setDebugOutput(true);


  }


  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);
