   dln(monitorDBG, " cm, ");
   return;
 }
+void getAnalog(float* a) {
+  if(! GOT_ANALOG_SENSOR) {
+    (*a) = 0.0;
+  } else if(analogSensor == "analog_mains") {
+    (*a) = 1.0;
+  } else if(analogSensor == "analog_pressure") {
+    (*a) = -1.0;
+  }
+
+  return;
+}
 
 /////////////////////////////////////////////////////////////////////////////
 // config utils /////////////////////////////////////////////////////////////

  long waterLevel1; // TODO should be an array
  long waterLevel2;
  long waterLevel3;
  // TODO add last reboot
  // TODO add free memory?
} monitor_t;
monitor_t monitorData[MONITOR_POINTS];
int monitorCursor = 0;

      dbg(valveDBG, "; wL2: "); dbg(valveDBG, now->waterLevel2);
      dbg(valveDBG, "; wL3: "); dln(valveDBG, now->waterLevel3);
    }
    if(GOT_ANALOG_SENSOR) { getAnalog(&now->analog);    yield(); }

    flowController.step(now); yield();  // set valves on and off etc.
    if(SEND_DATA) {                     // push data to the cloud
