 
     // set up staggered valve starts
     staggerMins = cycleMins / numValves;
+    dbg(valveDBG, "cycleMins = "); dbg(valveDBG, cycleMins);
+    dbg(valveDBG, " staggerMins = "); dln(valveDBG, staggerMins);
     long t = millis();
+    dbg(valveDBG, "millis = "); dln(valveDBG, t);
     long nextCycleStart = t;
     for(int i = 0; i < numValves; i++) {
       valves[i].startTime = nextCycleStart;
+      dbg(valveDBG, "valves["); dbg(valveDBG, i);
+      dbg(valveDBG, "].startTime = "); dln(valveDBG, nextCycleStart);
       nextCycleStart += getStaggerMillis();
     }
   }

  public:
  static int counter;           // counter for setting valve number
  int number;                   // id of this valve, counting from 1
  char dryMins = 45;            // mins to leave bed drained per cycle
  // in beds with overflows can be 0; else will be cycle time minus fill time
  long startTime = -1;          // when to start cycling (after boot)    
  bool gotOverflow = false;     // does the growbed have an overflow?
  char fillLevel = 5;           // cms below the level sensor: drain point
  bool filling = false;         // true when closed / on
  long lastFlip = -1;           // millis at last state change


String ip2str(IPAddress address);
#define dbg(b, s) if(b) Serial.print(s)
#define dln(b, s) if(b) Serial.println(s)
#define startupDBG true
#define valveDBG true
#define monitorDBG false
#define netDBG false
