-
-
Save OMikeGray/6bf644b6cda85bfe8c898ccd44ec6d78 to your computer and use it in GitHub Desktop.
Relay Example
This file contains 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
/* Firgelli Automations | |
* Limited or no support: we do not have the resources for Arduino code support | |
*/ | |
void setup() { | |
pinMode(7, OUTPUT); // Configure pin 7 as an Output | |
pinMode(8, OUTPUT); // Configure pin 8 as an Output | |
digitalWrite(7, HIGH); // Initialize pin 7 as Low | |
digitalWrite(8, HIGH); // Initialize pin 7 as Low | |
} | |
void loop() { | |
// Extend Linear Actuator | |
digitalWrite(7, LOW); | |
digitalWrite(8, HIGH); | |
delay(2000); // 2 seconds | |
// Stops Actuator | |
digitalWrite(7, HIGH); | |
digitalWrite(8, HIGH); | |
delay(2000); // 2 seconds | |
// Retracts Linear Actuator | |
digitalWrite(7, HIGH); | |
digitalWrite(8, LOW); | |
delay(2000); // 2 seconds | |
// Stop Actuator | |
digitalWrite(7, HIGH); | |
digitalWrite(8, HIGH); | |
delay(2000); // 2 seconds | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment