Created
January 18, 2021 00:36
-
-
Save alvesoaj/7aaaa9312a91054a7b50028437871c8a to your computer and use it in GitHub Desktop.
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
/* | |
* AJ Alves ([email protected]) | |
*/ | |
#define PUMP_PIN 2 // Water Pump Pin | |
void setup() { | |
Serial.begin(9600); // Serial Port setup | |
pinMode(PUMP_PIN, OUTPUT); // Set pin as OUTPUT | |
} | |
void loop() { | |
digitalWrite(PUMP_PIN, HIGH); // Set pin HIGH | |
Serial.println("The Water Pump is ON!"); | |
delay(3000); // Wait 3 seconds | |
digitalWrite(PUMP_PIN, LOW); // Set pin LOW | |
Serial.println("The Water Pump is OFF!"); | |
delay(3000); // Wait 3 seconds | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment