Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
ejshea
Published © GPL3+

1-Channel Relay Module and Air Valve

Connect a 1-channel relay module to control an electric solenoid air valve.

BeginnerFull instructions provided10,464
1-Channel Relay Module and Air Valve

Things used in this project

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Air Valve and Relay Wiring

Code

Air Valve Control

Arduino
//Control an electric solenoid air valve with a 1-channel relay module

void setup() {
  
  pinMode(8, OUTPUT);
  digitalWrite(8, LOW);
  
}

void loop() {
  
  delay(3000);
  digitalWrite(8, HIGH);
  delay(100);
  digitalWrite(8, LOW);

}

Credits

ejshea

ejshea

16 projects • 30 followers

Comments