 /**
 * 
  ****************************************************************************************************************************
- * Irrigation Controller 24 Zones With Options for Master Valve and Pump  v1
+ * Irrigation Controller 24 Zones With Options for Master Valve and Pump  v3.0
  * Simple, elegant irrigation controller that takes advantage of the cloud and SmartThings ecosystem
  * Arduino MEGA with SmartThings Shield  and 24 relay modules
  * Works by receiving irrigation run times from the Cloud and then builds a queue to execute

#include <SmartThings.h>
#include <Event.h>
#include <Timer.h>
#define PIN_THING_RX    10
#define PIN_THING_TX    2
#define PIN_THING_LED  13
SmartThingsCallout_t messageCallout;    // call out function forward decalaration
SmartThings smartthing(PIN_THING_RX, PIN_THING_TX, messageCallout);  // constructor

//user configurable global variables to set before loading to Arduino
int relays = 24;  //set up before loading to Arduino (max = 24 with current code and assumes last relay is a master valve/pump actuator)
boolean isActiveHigh=false; //set to true if using "active high" relay, set to false if using "active low" relay
boolean isDebugEnabled=false;    // enable or disable debug in this example  
boolean isPin4Pump =false;  //set to true if you add an additional relay to pin4 and use as pump or master valve.  

//set global variables

//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, relay24 is used as the pump/master valve switch.  Can be toggled by device tye v2.7 and later
const char* configPumpStatus = "off";
const char* pin4PumpStatus= "off";
boolean doUpdate = false;
boolean doPumpUpdate = false;

