From 05c5c6cdc356a01895e1e7b954b14e211b8dbacc Mon Sep 17 00:00:00 2001 From: Ron Kuris Date: Thu, 2 Jul 2015 07:25:44 -0700 Subject: [PATCH] Also move it up, do this as early as possible --- MPPT_Code/MPPT_Code.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MPPT_Code/MPPT_Code.ino b/MPPT_Code/MPPT_Code.ino index 9b9fd6d..f01fa41 100644 --- a/MPPT_Code/MPPT_Code.ino +++ b/MPPT_Code/MPPT_Code.ino @@ -173,13 +173,13 @@ LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I void setup() // run once, when the sketch starts { + TURN_OFF_MOSFETS; // turn off MOSFET driver chip pinMode(LED_RED, OUTPUT); // sets the digital pin as output pinMode(LED_GREEN, OUTPUT); // sets the digital pin as output pinMode(LED_YELLOW, OUTPUT); // sets the digital pin as output 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 - TURN_ON_MOSFETS; // turn off MOSFET driver chip Timer1.attachInterrupt(callback); // attaches callback() as a timer overflow interrupt Serial.begin(9600); // open the serial port at 38400 bps: pwm = PWM_START; // starting value for pwm