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.

  • 5,250 views
  • 6 comments
  • 19 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

Arduino Bluetooth Basic Tutorial

by Mayoogh Girish

  • 454,662 views
  • 42 comments
  • 236 respects

Home Automation Using Raspberry Pi 2 And Windows 10 IoT

Project tutorial by Anurag S. Vasanwala

  • 285,521 views
  • 95 comments
  • 671 respects

Security Access Using RFID Reader

by Aritro Mukherjee

  • 229,333 views
  • 38 comments
  • 236 respects

OpenCat

Project in progress by Team Petoi

  • 196,001 views
  • 154 comments
  • 1,363 respects
Add projectSign up / Login