Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
* AJ Alves (
#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