sasmithaadithya35
Published

Make a smart tap

Making a smart tap for viruses

IntermediateWork in progress35
Make a smart tap

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Water Solenoid Valve
×1
IR sensor module
×1
Relay Module (Generic)
×1
60W PCIe 12V 5A Power Supply
Digilent 60W PCIe 12V 5A Power Supply
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
Arduino Web Editor
Arduino Web Editor

Story

Read more

Schematics

smart_tapppp_Kpnctwtzdu.PNG

This is sketch diagram

Code

Smart Tap

Arduino
int IRSensor = 2; // connect ir sensor to arduino pin 2
int solenoid = 11; // conect solenoid to arduino pin 11



void setup() 
{
  pinMode (IRSensor, INPUT); // sensor pin INPUT
  pinMode (solenoid, OUTPUT); // solenoid pin OUTPUT
}

void loop()
{
  int statusSensor = digitalRead (IRSensor);
  
  if (statusSensor == 1){
    digitalWrite(solenoid, LOW); // solenoid LOW
  }
  
  else
  {
    digitalWrite(solenoid, HIGH); // solenoid High
  }
}

Credits

sasmithaadithya35

sasmithaadithya35

1 project • 0 followers

Comments

Add projectSign up / Login