 String ANALOG_SENSOR_PRESSURE = "analog_pressure";
 String analogSensor = ANALOG_SENSOR_NONE;
 boolean GOT_ANALOG_SENSOR = false; // change later if we config a sensor
+EnergyMonitor emon1; // instance of energy monitor, for mains current sensor
 
 /////////////////////////////////////////////////////////////////////////////
 // valves and flow control //////////////////////////////////////////////////

    // tsl.setTiming(TSL2591_INTEGRATIONTIME_600MS); // longest (dim)
  }
  
  //Wire.begin();
  Wire.beginTransmission(pH_Add);
  error = Wire.endTransmission();
  if(error==0){
    GOT_PH_SENSOR = true;
    dln(monitorDBG, "Found pH sensor");
  }
}


  if(! GOT_ANALOG_SENSOR) {
    (*a) = 0.0;
  } else if(analogSensor == "analog_mains") {
    (*a) = (float) emon1.calcIrms(1480);
  } else if(analogSensor == "analog_pressure") {
    int analogValue = analogRead(A0);

