Project tutorial
Arduino-Based Automatic Water Tap Using IR Sensor

Arduino-Based Automatic Water Tap Using IR Sensor © GPL3+

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.

  • 20,816 views
  • 8 comments
  • 26 respects

Components and supplies

Necessary tools and machines

Hy gluegun
Hot glue gun (generic)

About this project

This project is an automatic water tab system to solve the problem of water wastage in our daily life.

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
             
}

Comments

Similar projects you might like

Preemptive Multitasking Scheduler for AVR

Project tutorial by Akash Kollipara

  • 2,467 views
  • 0 comments
  • 4 respects

Beautifully Finished Humidity and Temperature Sensor

Project tutorial by Wicked Makers

  • 20,939 views
  • 22 comments
  • 150 respects

Arduino Control AC Water Heater temperature

Project tutorial by Mohannad Rawashdeh

  • 15,189 views
  • 0 comments
  • 11 respects

Arduino BME280 Sensor How To

by Dragos Iosub

  • 1,553 views
  • 0 comments
  • 2 respects

Smoke Detection using MQ-2 Gas Sensor

by Aritro Mukherjee

  • 322,668 views
  • 54 comments
  • 204 respects

Complete Digital Clock Including Alarm and Motion Sensor

Project tutorial by LAGSILVA

  • 21,316 views
  • 22 comments
  • 73 respects
Add projectSign up / Login