 #define PWM_MIN             10            // the value for pwm duty cyle 0-100%
 #define PWM_START           90            // the value for pwm duty cyle 0-100%
 #define PWM_INC             1             // the value the increment to the pwm value for the ppt algorithm
-#define TURN_ON_MOSFETS     digitalWrite(PWM_ENABLE_PIN, HIGH)      // enable MOSFET driver
-#define TURN_OFF_MOSFETS    digitalWrite(PWM_ENABLE_PIN, LOW)      // disable MOSFET driver
 
 #define AVG_NUM             8             // number of iterations of the adc routine to average the adc readings
 #define SOL_AMPS_SCALE      0.74          // the scaling value for raw adc reading to get solar amps scaled by 100 [(1/(0.005*(3.3k/25))*(5/1023)*100]
 #define SOL_VOLTS_SCALE     2.7           // the scaling value for raw adc reading to get solar volts scaled by 100 [((10+2.2)/2.2)*(5/1023)*100]
 #define BAT_VOLTS_SCALE     2.7           // the scaling value for raw adc reading to get battery volts scaled by 100 [((10+2.2)/2.2)*(5/1023)*100]
+
 #define ONE_SECOND          50000         // count for number of interrupt in 1 second on interrupt period of 20us
 #define LOW_SOL_WATTS       500           // value of solar watts scaled by 100 so this is 5.00 watts
 #define MIN_SOL_WATTS       100           // value of solar watts scaled by 100 so this is 1.00 watts

//------------------------------------------------------------------------------------------------------
void setup()                            // run once, when the sketch starts
{
  Serial.begin(9600);                  // open the serial port at 9600 bps:
  pinMode(PWM_ENABLE_PIN, OUTPUT);     // sets the digital pin as output
  Timer1.initialize(20);               // initialize timer1, and set a 20uS period
  Timer1.pwm(PWM_PIN, 0);              // setup pwm on pin 9, 0% duty cycle


#define PWM_PIN             9             // the output pin for the pwm, connected to OC1A
#define PWM_ENABLE_PIN      8             // pin used to control shutoff function of the IR2104 MOSFET driver
#define TURN_ON_MOSFETS     digitalWrite(PWM_ENABLE_PIN, HIGH)     // enable MOSFET driver
#define TURN_OFF_MOSFETS    digitalWrite(PWM_ENABLE_PIN, LOW)      // disable MOSFET driver

#define ADC_SOL_AMPS_CHAN   1             // the adc channel to read solar amps
#define ADC_SOL_VOLTS_CHAN  0             // the adc channel to read solar volts
