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 ...

Voice Control Humanoid Robot - Best Project For Collage students / amazing science project

                          Click Here Full Making Video Link -  https://youtu.be/wHjmwelL95c

......................Diagram........................




.............................Arduino Code..........................



#include <SoftwareSerial.h>


SoftwareSerial BT(0, 1); //TX, RX respetively

String readvoice;


void setup() {

 BT.begin(9600);

 Serial.begin(9600);

  pinMode(4, OUTPUT);

  pinMode(3, OUTPUT);

  pinMode(5, OUTPUT);

  pinMode(6, OUTPUT);


}

//-----------------------------------------------------------------------// 

void loop() {

  while (BT.available()){  //Check if there is an available byte to read

  delay(10); //Delay added to make thing stable

  char c = BT.read(); //Conduct a serial read

  readvoice += c; //build the string- "forward", "reverse", "left" and "right"

  } 

  if (readvoice.length() > 0) {

    Serial.println(readvoice);


  if(readvoice == "*forward#")

  {

    digitalWrite(3, HIGH);

    digitalWrite (4, HIGH);

    digitalWrite(5,LOW);

    digitalWrite(6,LOW);

    delay(100);

  }


  else if(readvoice == "*back#")

  {

    digitalWrite(3, LOW);

    digitalWrite(4, LOW);

    digitalWrite(5, HIGH);

    digitalWrite(6,HIGH);

    delay(100);

  }


  else if (readvoice == "*left#")

  {

    digitalWrite (3,HIGH);

    digitalWrite (4,LOW);

    digitalWrite (5,LOW);

    digitalWrite (6,LOW);

   delay (800);

      digitalWrite(3, HIGH);

    digitalWrite (4, HIGH);

    digitalWrite(5,LOW);

    digitalWrite(6,LOW);

    delay(100);

  

  }


 else if ( readvoice == "*right#")

 {

   digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, LOW);

   digitalWrite (6, LOW);

   delay (800);

      digitalWrite(3, HIGH);

    digitalWrite (4, HIGH);

    digitalWrite(5,LOW);

    digitalWrite(6,LOW);

    delay(100);

 }


 else if (readvoice == "*stop#")

 {

   digitalWrite (3, LOW);

   digitalWrite (4, LOW);

   digitalWrite (5, LOW);

   digitalWrite (6, LOW);

   delay (100);

 }

 else if (readvoice == "*keep watch in all direction#")

 {

   digitalWrite (3, HIGH);

   digitalWrite (4, LOW);

   digitalWrite (5, LOW);

   digitalWrite (6, LOW);

   delay (100);

 }

  else if (readvoice == "*show me Garba#")

 {

 digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, LOW);

   digitalWrite (6, LOW);

   delay (400);

      digitalWrite(3, HIGH);

    digitalWrite (4, HIGH);

    digitalWrite(5,LOW);

    digitalWrite(6,LOW);

    delay(600);

    digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, HIGH);

   digitalWrite (6, LOW);

   delay (500);

   digitalWrite (3, HIGH);

   digitalWrite (4, LOW);

   digitalWrite (5, LOW);

   digitalWrite (6, HIGH);

   delay (500);


digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, LOW);

   digitalWrite (6, LOW);

   delay (400);

      digitalWrite(3, HIGH);

    digitalWrite (4, HIGH);

    digitalWrite(5,LOW);

    digitalWrite(6,LOW);

    delay(600);

    digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, HIGH);

   digitalWrite (6, LOW);

   delay (500);

   digitalWrite (3, HIGH);

   digitalWrite (4, LOW);

   digitalWrite (5, LOW);

   digitalWrite (6, HIGH);

   delay (500);digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, LOW);

   digitalWrite (6, LOW);

   delay (400);

      digitalWrite(3, HIGH);

    digitalWrite (4, HIGH);

    digitalWrite(5,LOW);

    digitalWrite(6,LOW);

    delay(600);

    digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, HIGH);

   digitalWrite (6, LOW);

   delay (500);

   digitalWrite (3, HIGH);

   digitalWrite (4, LOW);

   digitalWrite (5, LOW);

   digitalWrite (6, HIGH);

   delay (500);digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, LOW);

   digitalWrite (6, LOW);

   delay (400);

      digitalWrite(3, HIGH);

    digitalWrite (4, HIGH);

    digitalWrite(5,LOW);

    digitalWrite(6,LOW);

    delay(600);

    digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, HIGH);

   digitalWrite (6, LOW);

   delay (500);

   digitalWrite (3, HIGH);

   digitalWrite (4, LOW);

   digitalWrite (5, LOW);

   digitalWrite (6, HIGH);

   delay (500);digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, LOW);

   digitalWrite (6, LOW);

   delay (400);

      digitalWrite(3, HIGH);

    digitalWrite (4, HIGH);

    digitalWrite(5,LOW);

    digitalWrite(6,LOW);

    delay(600);

    digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, HIGH);

   digitalWrite (6, LOW);

   delay (500);

   digitalWrite (3, HIGH);

   digitalWrite (4, LOW);

   digitalWrite (5, LOW);

   digitalWrite (6, HIGH);

   delay (500);digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, LOW);

   digitalWrite (6, LOW);

   delay (400);

      digitalWrite(3, HIGH);

    digitalWrite (4, HIGH);

    digitalWrite(5,LOW);

    digitalWrite(6,LOW);

    delay(600);

    digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, HIGH);

   digitalWrite (6, LOW);

   delay (500);

   digitalWrite (3, HIGH);

   digitalWrite (4, LOW);

   digitalWrite (5, LOW);

   digitalWrite (6, HIGH);

   delay (500);digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, LOW);

   digitalWrite (6, LOW);

   delay (400);

      digitalWrite(3, HIGH);

    digitalWrite (4, HIGH);

    digitalWrite(5,LOW);

    digitalWrite(6,LOW);

    delay(600);

    digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, HIGH);

   digitalWrite (6, LOW);

   delay (500);

   digitalWrite (3, HIGH);

   digitalWrite (4, LOW);

   digitalWrite (5, LOW);

   digitalWrite (6, HIGH);

   delay (500);digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, LOW);

   digitalWrite (6, LOW);

   delay (400);

      digitalWrite(3, HIGH);

    digitalWrite (4, HIGH);

    digitalWrite(5,LOW);

    digitalWrite(6,LOW);

    delay(600);

    digitalWrite (3, LOW);

   digitalWrite (4, HIGH);

   digitalWrite (5, HIGH);

   digitalWrite (6, LOW);

   delay (500);

   digitalWrite (3, HIGH);

   digitalWrite (4, LOW);

   digitalWrite (5, LOW);

   digitalWrite (6, HIGH);

   delay (500);

 }



 readvoice="";}} //Reset the variable



Comments

Unknown said…
Bhai code kha h code visible nhi ho rha h
Unknown said…
Bhai code me koi changes bhi karne ha kya
Unknown said…
Kya ye coding kafi ho gi ,mtlab is me Kuch change to ni na krna
ishaan said…
bhai digital arduino uno pe kya kam hogi?
jai shree ram said…
bhai kripaya kar diagram ka level me galti kyu karte ho


jai shree ram

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