   } else {
     if ( event_count > 0 ) {
       event_count--;
+    }
+    if ( printer_count > 0) {
+      printer_count--;
     }
     if ( counter == 0 ) {
       proxim_samples[index] = proxim_value;

  if ( counter >= 20 ) {
    counter = 0;
  }
}

bool connectClient() {

Adafruit_VCNL4010 proxim_sensor;

#define NB_PROXIM_SAMPLES 20
#define NB_ANOMALY_COUNTS 9

#define MAX_CLIENT_RETRIES 10

uint16_t proxim_nominal = 2000;
uint16_t proxim_anomaly = 240;
uint16_t event_count = 0;

uint16_t proxim_samples[NB_PROXIM_SAMPLES];
