    }
 
 
-  long long currentTime = millis();
-
-  runningTotal += currentValue;
-  samplesTaken++;
-
-  //We don't want to keep printing to screen as it is slow so we just do a running average
-  if((currentTime - lastDisplayTime) >= INTERVAL_PRINT){
-
-    lastDisplayTime = currentTime;
-    double average = runningTotal / samplesTaken;
-
-    runningTotal = 0;
-    samplesTaken = 0;
-
-    lcd.setCursor(0, 0);
-    lcd.print(currentValue);
-  }
+//  long long currentTime = millis();
+//
+//  runningTotal += currentValue;
+//  samplesTaken++;
+//
+//  //We don't want to keep printing to screen as it is slow so we just do a running average
+//  if((currentTime - lastDisplayTime) >= INTERVAL_PRINT){
+//
+//    lastDisplayTime = currentTime;
+//    double average = runningTotal / samplesTaken;
+//
+//    runningTotal = 0;
+//    samplesTaken = 0;
+//
+//    lcd.setCursor(0, 0);
+//    lcd.print(currentValue);
+//  }
 
 
 }

  pinMode(PIN_RELAY_MCB, OUTPUT);
  pinMode(PIN_BUTTON_ENTER, INPUT);


  changeDisplayBacklight(true);
  passFullCurrentThrough(false);
  changeMCBRelayState(false);


  lcd.begin();
  lcd.setCursor(0, 0);
  lcd.print("Short Circuit Limiter");

  lcd.setCursor(0, 3);
  lcd.print("Waiting to settle...");

  unsigned long initialTime = 0;

  while((millis() - initialTime) < INITIAL_SETTLE_TIME){
    clamp.doIncrementalMeasurement();
  }

  //To clear the accmulated reading
  clamp.getIrmsFromIncrementalMeasurement();
  lcd.clear();
  
  Serial.begin(115200);
  Serial.println("Setup complete");

#include <U8g2lib.h>
#include "CTSensor.h"

#define CURRENT_ENABLE_THRESHOLD 0.2
