Created
November 14, 2018 02:21
-
-
Save giljr/c97facd8d07b427e5ea28fd2221698c0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define control1 8 // pin that controls the MOSFET | |
#define control2 9 // pin that controls the MOSFET | |
void setup() { | |
pinMode(control1, OUTPUT); // define control pin as output | |
pinMode(control2, OUTPUT); // define control pin as output | |
Serial.begin(9600); | |
} | |
void loop() { | |
digitalWrite(control1, HIGH); // turn the MOSFET Switch ON | |
digitalWrite(control2, HIGH); // turn the MOSFET Switch ON | |
delay(2000); // Wait for 2000 ms or 2 second | |
digitalWrite(control1, LOW); // Turn the MOSFET Switch OFF | |
digitalWrite(control2, LOW); // Turn the MOSFET Switch OFF | |
delay(2000); // Wait for 2000 ms or 2 second | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment