Creatjet3D-Labsmunazirali4793
Published © GPL3+

Arduino-Based Automatic Water Tap Using IR Sensor

In this project, we have made an automatic water tap using Arduino and IR sensor to solve the problem of wastage of water in our daily life.

IntermediateFull instructions provided8,298
Arduino-Based Automatic Water Tap Using IR Sensor

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
Dual H-Bridge motor drivers L293D
Texas Instruments Dual H-Bridge motor drivers L293D
×1
Breadboard (generic)
Breadboard (generic)
×1
Motor Adapter for NI myRIO
Digilent Motor Adapter for NI myRIO
×1

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)

Story

Read more

Code

Arduino based automatic water tab using IR sensor.

C/C++
In this project we have made automatic water tab using Arduino and IR sensor to solve the problem of wastage of water in daily life.
#include <Servo.h>


const int SensorPin = 3;  
//int sensorValue = 0;                
int myservo = 9;
int pos = 0; 
Servo servo;

void setup() {
  
servo.attach(myservo);
}

void loop() {
  
  digitalRead(3);
  if(SensorPin==HIGH) 
  servo.attach(9);  
  pos = 90;               // start at midpoint 90 degrees
//  Speed = 3;              // servo moves 3 degrees each time left/right is pushed// attaches the servo on pin 9 to the servo object 
             // start at midpoint 90 degrees             // servo moves 3 degrees each time left/right is pushed    // Set initial position
             
}

Credits

Creatjet3D-Labs

Creatjet3D-Labs

7 projects • 10 followers
munazirali4793

munazirali4793

8 projects • 6 followers

Comments

Add projectSign up / Login