|
@@ -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
|