소스 검색

Also move it up, do this as early as possible

Ron Kuris 9 년 전
부모
커밋
05c5c6cdc3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      MPPT_Code/MPPT_Code.ino

+ 1 - 1
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