         processOBD();
       }
     #endif //USE_OBD
-
-    #if USE_MEMS
-      // process MEMS data if available
-      if (state & STATE_MEMS_READY) {
-          processMEMS();
-      }
-    #endif //USE_MEMS
 
       // read and log voltage at OBD2
       int v = getVoltage() * 100;


  #if USE_ESP8266
    // initialize ESP8266 xBee module (if present)
    Serial.print("#ESP8266... ");
    xbBegin(XBEE_BAUDRATE);
    if (initWifi())
    {

        if (deviceTemp >= COOLING_DOWN_TEMP)
        {
          // device too hot, slow down communication a bit
          coolDown();
          break;
        }
      }
    } while (millis() - start < MIN_LOOP_TIME);
  }

private:

  void coolDown()
  {
    Serial.print("Cool down (");
    Serial.print(deviceTemp);
    Serial.println(" C)");
    delay(5000);
  }

#if USE_ESP8266
  bool connectWifi()
  {
    // attempt to join AP with pre-defined credential
    for (byte n = 0; ;n++)
    {
      delay(100);
      Serial.print("WIFI (SSID:");
      Serial.print(WIFI_SSID);
      Serial.print(")... ");
      if (setupWifi())
      {
        return true;
      }
      else
      {
