Wet & Dry Waste Smart Dustbin for House | Best science Project | Harish Projects

Image
 Watch Full Detailed video 👇🏻 Diagram in Video👆 //Arduino Code// //YouTube: Harish Projects //Order Electronic Parts & Project kit:  HarishProjects.com // #include <Servo.h> Servo servo1; const int trigPin = 12; const int echoPin = 11; long duration; int distance=0; int potPin = A0; //input pin int soil=0; int fsoil; void setup()  {   Serial.begin(9600); //Serial.print("Humidity"); pinMode(trigPin, OUTPUT);  pinMode(echoPin, INPUT);  servo1.attach(8); } void loop()  { //YouTube: Harish Projects //Order Electronic Parts & Project kit:  HarishProjects.com //      int soil=0;   for(int i=0;i<2;i++)   { digitalWrite(trigPin, LOW); delayMicroseconds(7); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); delayMicroseconds(10); duration = pulseIn(echoPin, HIGH); distance= duration*0.034/2+distance; delay(10);   }   distance=distance/2;   Serial.println(distance); if ...

How to make smart Dustbin & get free Chocolate Best Arduino Project

 Watch video on YouTube

Click here - https://youtu.be/TET7ZB5weYo


Diagram 


Arduino Code


/*

  code started

  diy smart chocolate dustbin

  #define led = D4;

  #define trigger pin = D5;

  #define echo pin = D6;

  #define servo pin = D9;

  #define servo pin2 =D10;

  code created by technical ideas yt

  https://youtube.com/c/TechnicalidEas07

 

 */

#include <Servo.h>

 

Servo servo1;

 

Servo servo2;

 

int led=4;

 

int trig=5;

 

int echo=6;

 

int servo1_pin=9;

 

int servo2_pin=10;

 

int duration=0,dist=0;

 

void setup()

 

{

 

  Serial.begin(9600);

 

  

 

pinMode(led,OUTPUT);

 

pinMode(trig,OUTPUT);

 

pinMode(echo,INPUT);

 

  servo1.attach(servo1_pin);

 

  servo2.attach(servo2_pin);

 

  servo1.write(90);

 

  servo2.write(90);

 

}

 

 

void loop()

 

{

 

  digitalWrite(trig, HIGH);

 

delayMicroseconds(10);

 

digitalWrite(trig, LOW);

 

pinMode(echo, INPUT);

 

duration = pulseIn(echo, HIGH);

 

dist = (duration*0.034) / 2; //obtain distance

 

 

if(dist<20)

 

{

 

  Serial.println("Dustbin Open");

 

 

  digitalWrite(led,HIGH);

 

  servo1.write(90);

 

  servo2.write(0);

 

  delay(5000);

 

 

 

}

 

else

 

{

 

  Serial.println("Chocolate Closed");

 

  digitalWrite(led,LOW);

 

 

  servo1.write(0);

 

  servo2.write(90);

 

  delay(1000);

 

}

 

}

Comments

Unknown said…
Mujhe yeh dustbin chahiye kitna ka hai hum aapko mail bhi kiye hai
Kamalendu said…
Please send ardi no code

Popular posts from this blog

Smart Bridge - Automatic Hight increase when flooding | Best science Project

How to make Phone control RC car using Arduino #phoneControlCar

Inspire Award Project | Train accident Prevention project | Best science Project / Harish Projects