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 (distance <20 && distance>1) {   delay(1000); for(int i

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

 


Watch video on YouTube.


//Arduino Code//

//Code by Harish Projects
//Orde science projects kit & electronics parts from "HarishProjects.com"

#include <Servo.h> //Install this library

Servo tap_servo;

int sensor_pin = 5;   //Connect D5 of Arduino
int tap_servo_pin =4; //Connect D4 of Arduino
int val;

void setup(){
  pinMode(sensor_pin,INPUT);
  tap_servo.attach(tap_servo_pin);
 
}

void loop(){
  val = digitalRead(sensor_pin);

  if (val==0)
  {tap_servo.write(0);
  }
  if (val==1)
  {tap_servo.write(90); //If you want you can increase & Decrease servo rotation
    }
}
//Project Diagram 1 //

//Project Diagram 2//



Comments

Unknown said…
Plz tell me the price for buying this model. I need it in 4-5 days.
Sandy said…
Motor ko bhi coding krna hai lya hmari motor start nhi ho rhi hai
Unknown said…
hello sir,i want to talk to you.there is something problem with us plz help us out on tuesday we are having exhibition plz contact us on 9708679481
Creamymelody said…
Unknown are you from central school?
Unknown said…
is code correct?
motors are not rotating
Lee said…
Mula kasto wrong code deko tw 🙄
Lochan said…
Motors are not rotating

Contact number 6361687608
Avik Kumar said…
hello sir,i want to talk to you.there is something problem with us plz help us out on tuesday we are having exhibition plz contact me on 7858936703
Dibya said…
Give the Correct Code immediately. Thankyou, Mob no:7577981953
Kabir said…
Is the above code functional? Please tell me i have a college project.
unknown said…
vai code to thik karlo
Nikhil said…
This comment has been removed by the author.
Nikhil said…
change the code below and it will work fine
int sensor_pin = 5;
int tap_servo_pin =4;
Ankit Kumar said…
Sir my number is 9122869036 please call me sir please
JATIN said…
My sensor is working properly and I copied your code and posted it correctly but my motor is not functioning properly.the motors are moving but not accordingly to sensor .
Please tell me what's the problem.
Unknown said…
Sir my servo motor is not rotating pls check l need to submit Wednesday .


hiba said…
i need your help on this project
Poornesh said…
first give the correct code for your project mind it
Poornesh said…
you bloody fool first give correct code
Krishna Kumar said…
Bro the given code is not correct the correct code is
#include

const int soilMoisturePin = A0;
const int servoPin = 9; // Adjust these pin numbers according to your setup
const int servo2Pin = 10; // Second servo pin
const int moistureThreshold = 500; // Adjust this value according to your sensor's readings

Servo bridgeServo;
Servo bridgeServo2;

// Define angles for lifted and lowered positions
const int liftedAngle = 90;
const int loweredAngle = 0;

void setup() {
pinMode(soilMoisturePin, INPUT);
bridgeServo.attach(servoPin);
bridgeServo2.attach(servo2Pin);
}

void loop() {
int moistureLevel = analogRead(soilMoisturePin);

if (moistureLevel < moistureThreshold) {
// If soil is moist enough, lift the bridge
liftBridge();
} else {
// Otherwise, keep the bridge down
lowerBridge();
}
}

void liftBridge() {
// Move the servo motors to lift the bridge
bridgeServo.write(liftedAngle); // Use lifted angle
bridgeServo2.write(liftedAngle); // Second servo angle
delay(1500); // Adjust delay as needed
}

void lowerBridge() {
// Move the servo motors to lower the bridge
bridgeServo.write(loweredAngle); // Use lowered angle
bridgeServo2.write(loweredAngle); // Second servo angle
delay(1500); // Adjust delay as needed
}



You should change the signal pin number to 9 and 10
Sparsh said…
Hey Krishna kumar who said you that this code is correct I am a state level science project student and this code is completely wrong so see the code again and post it later , thank you.
VV said…
This comment has been removed by the author.
VV said…
Hi sir, I need your help sir , the servo is not rotating for this project sir , kindly help me sir
Naveen Badiger said…
Hello Sir/Madam,

Could someone ping the correct code,it will me more helpful for the students who are working on it.
kumar said…
i want to buy how to buy
anup said…
This comment has been removed by the author.
anup said…
contact on 7016235627 we need your help

Popular posts from this blog

How to make Phone control RC car using Arduino #phoneControlCar

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