   for (uint16_t i = 0; i < NB_PROXIM_SAMPLES; i++) {
     proxim_samples[i] = proxim_nominal;
   }
-  Serial.begin(9600);
+  Serial.begin(115200);
   if ( !proxim_sensor.begin() ) {
     Serial.println("Proximity Sensor not found: stop!");
     while (1);

  char pass[MAX_STRING_LENGTH];
  eeprom2str(0, ssid);
  eeprom2str(MAX_STRING_LENGTH, pass);
  delay(100);   // not sure why, but examples work like this
  Serial.println();
  Serial.print("Connecting to network with SSID = ");
  Serial.println(ssid);

  // Connect to Wifi
  while (WiFi.status() != WL_CONNECTED) {

  setup_wifi();
  mqttClient.setServer(MQTT_SERVER, MQTT_PORT);

  // Prepare client
  connectClient();
  
  // Schedulers
  // tickerHeartbeat.attach(10, heartbeat);
  // tickerUpdate.attach_ms(100, update);

}

void loop() {
  static bool raised = false;
  static uint8_t counter = 0;
  static unsigned long last_millis = millis();

  // publish heartbeat
  unsigned long now_millis = millis();
  if ( now_millis - last_millis > 50 ) {
    update();
    counter++;
    if ( counter == 200 ) {
      heartbeat();
      counter = 0;
    }
    last_millis = now_millis;
  }

  // take care of event if any
  if ( !raised && event_count >= NB_ANOMALY_COUNTS ) {
    door_opened();
    raised = true;
