  ****************************************************************************************************************************
  * Libraries:
  * Timer library was created by Simon Monk as modified by JChristensen  https://github.com/JChristensen/Timer
- *   KNOWN LIBRARY BUG (timer.cpp) - identified by mattnichols 5/20/14 - has no known affect on the code below
  * SmartThings library available from https://www.dropbox.com/s/8hon320qmuio8fz/Shield%20Library.zip
  * SoftwareSerial library was default library provided with Arduino IDE
  *

//initialize pump related variables. 
int pin4Relay = 4;  //pin4 reserved for optional additional relay to control a pump or master valve
boolean isConfigPump = false; // if true, relay8 is used as the pump/master valve switch.  Can be toggled by device tye v2.7 and later
char* configPumpStatus = "off";
char* pin4PumpStatus= "off";
boolean doUpdate = false;
boolean doPumpUpdate = false;

void setup()
{

  digitalWrite(relay[trafficCop], relayOff);
  smartthing.shieldSetLED(0, 0, 1);
  queue[trafficCop]=0; //remove relay from from queue
  if (maxvalue() ==0) {
    if (isConfigPump || isPin4Pump) {
      int8_t pumpOffEvent = t.after(pumpOffDelay*60L*1000L, pumpOff);  //turns off pump after delay
    }  
  }
  trafficCop=0; //ready to check queue or watch for new commmonds
  scheduleUpdate();
  schedulePumpUpdate();
