 
 void sendDataToPC() {
   if (deviceConnected) {
-    updateSensorsData();
     DataPacket dataPackage;
     dataPackage.accelerometerX = myIMU.ax;
     dataPackage.accelerometerY = myIMU.ay;

}

void setup() {
  Wire.setClock(400000L);
  Wire.begin();
  Serial.begin(115200);

  setupHTTPServer();
  setupMDNS();
  setupNTP();
  interruptSetup();
  ESP.wdtEnable(WDTO_8S);
  Serial.println("Device initialized");
}

void measure(void) {
  myIMU.delt_t = millis() - myIMU.count;
  updateSensorsData();
  sendDataToPC();
  myIMU.count = millis();
  myIMU.sumCount = 0;
  myIMU.sum = 0;
}

// 160Mhz -> 160*10^6 = 1 second
// 60 Hz -> 1/60*1000000 = 16666.666666667 microsecond(period) (µs(p))
// microsecond -> 16666*160/1.47 = 1813986
// 1/60*1000000*160/1.47
#define TIMER0_TIME 1814058

void inline timer0_ISR (void) {
  noInterrupts();
  measure();
  timer0_write(ESP.getCycleCount() + TIMER0_TIME);
  interrupts();
}

void interruptSetup() {
  noInterrupts();
  timer0_isr_init();
  timer0_attachInterrupt(timer0_ISR);
  timer0_write(ESP.getCycleCount() + TIMER0_TIME);
  interrupts();
}

void loop() {
  webSocket.loop();
  //server.handleClient();
  ESP.wdtFeed();
}

void setupMPU9250() {
