Arduino Fire Fighting Robot| RRX Tech |

Поділитися
Вставка
  • Опубліковано 2 лис 2024

КОМЕНТАРІ • 53

  • @RRXShorts
    @RRXShorts  9 місяців тому +41

    Code-
    #include
    Servo myservo; // create servo object to control a servo
    // twelve servo objects can be created on most boards
    int pos = 0;
    void setup() {
    // put your setup code here, to run once:
    myservo.attach(11);
    pinMode(2, OUTPUT);
    pinMode(3, OUTPUT);
    pinMode(4, OUTPUT);
    pinMode(5, OUTPUT);
    pinMode(6, OUTPUT);
    pinMode(A0, INPUT);
    pinMode(A1, INPUT);
    pinMode(A2, INPUT);
    Serial.begin(9600);
    digitalWrite(6, HIGH);
    }
    void loop() {
    // put your main code here, to run repeatedly:
    int a = analogRead(A0);
    int b = analogRead(A1);
    int c = analogRead(A2);
    Serial.print(a);
    Serial.print(" ");
    Serial.print(b);
    Serial.print(" ");
    Serial.print(c);
    Serial.println(" ");
    delay(50);
    if (a>=990)
    {
    digitalWrite(2, LOW);
    digitalWrite(3, LOW);
    digitalWrite(4, LOW);
    digitalWrite(5, LOW);
    digitalWrite(6, LOW);
    for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos); // tell servo to go to position in variable 'pos'
    delay(15); // waits 15 ms for the servo to reach the position
    }
    for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos); // tell servo to go to position in variable 'pos'
    delay(15); // waits 15 ms for the servo to reach the position
    }
    for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos); // tell servo to go to position in variable 'pos'
    delay(15); // waits 15 ms for the servo to reach the position
    }
    //delay(200);
    }
    else if(b>=800)
    {
    digitalWrite(2, LOW);
    digitalWrite(3, LOW);
    digitalWrite(4, LOW);
    digitalWrite(5, LOW);
    digitalWrite(6, LOW);
    for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos); // tell servo to go to position in variable 'pos'
    delay(15); // waits 15 ms for the servo to reach the position
    }
    for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos); // tell servo to go to position in variable 'pos'
    delay(15); // waits 15 ms for the servo to reach the position
    }
    for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos); // tell servo to go to position in variable 'pos'
    delay(15); // waits 15 ms for the servo to reach the position
    }
    }
    else if(c>=990)
    {
    digitalWrite(2, LOW);
    digitalWrite(3, LOW);
    digitalWrite(4, LOW);
    digitalWrite(5, LOW);
    digitalWrite(6, LOW);
    for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos); // tell servo to go to position in variable 'pos'
    delay(15); // waits 15 ms for the servo to reach the position
    }
    for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos); // tell servo to go to position in variable 'pos'
    delay(15); // waits 15 ms for the servo to reach the position
    }
    for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
    myservo.write(pos); // tell servo to go to position in variable 'pos'
    delay(15); // waits 15 ms for the servo to reach the position
    }
    }
    else if(a200)
    {
    digitalWrite(2, LOW);
    digitalWrite(3,HIGH);
    digitalWrite(4, HIGH);
    digitalWrite(5, LOW);
    delay(100);
    digitalWrite(2, LOW);
    digitalWrite(3, LOW);
    digitalWrite(4, LOW);
    digitalWrite(5, LOW);
    digitalWrite(6, LOW);
    delay(100);
    digitalWrite(6, HIGH);
    delay(100);
    }
    else if(b400)
    {
    digitalWrite(2, LOW);
    digitalWrite(3,HIGH);
    digitalWrite(4, HIGH);
    digitalWrite(5, LOW);
    delay(100);
    digitalWrite(2, LOW);
    digitalWrite(3, LOW);
    digitalWrite(4, LOW);
    digitalWrite(5, LOW);
    digitalWrite(6, LOW);
    delay(100);
    digitalWrite(6, HIGH);
    delay(100);
    }
    else if(c400)
    {
    digitalWrite(2, LOW);
    digitalWrite(3,HIGH);
    digitalWrite(4, HIGH);
    digitalWrite(5, LOW);
    delay(100);
    digitalWrite(2, LOW);
    digitalWrite(3, LOW);
    digitalWrite(4, LOW);
    digitalWrite(5, LOW);
    digitalWrite(6, LOW);
    delay(100);
    digitalWrite(6, HIGH);
    delay(100);
    }
    else
    {
    digitalWrite(6, LOW);
    digitalWrite(2, LOW);
    digitalWrite(3, LOW);
    digitalWrite(4, LOW);
    digitalWrite(5, LOW);

    }

    }

  • @karan_singh98
    @karan_singh98 9 місяців тому +1

    Hi brother I have made this project relay show green light but water pump not working . Yes I have not connected the motor but water pump is working on normal connection of 9v

  • @Dora_gaming_5467
    @Dora_gaming_5467 3 місяці тому +1

    Hi I'm making this and I completed this but when I put fire in front of sensor it goes forward but didn't stop and it's servo and water pump does not work can you contact with me please😢

  • @ananyadudhalkar7392
    @ananyadudhalkar7392 8 місяців тому +2

    Circuit diagram plus all the components used please name them

  • @GreetyJasmine-q3h
    @GreetyJasmine-q3h 25 днів тому +3

    Bro iam scool Student plz send the diagram

  • @harish012.
    @harish012. 5 місяців тому +7

    Your code totally wrong bro please send correct code please

  • @Singhdasnoor
    @Singhdasnoor 8 місяців тому +2

    I want circuit diagram plz send me

  • @Thinbrushtechnical9730
    @Thinbrushtechnical9730 9 місяців тому +2

    From which line code start ans pls send diagram

  • @RRXShorts
    @RRXShorts  9 місяців тому +1

    If any issue comes you can ask me

  • @jadenpadilla4467
    @jadenpadilla4467 7 місяців тому +2

    bro you have diagram? please send a link tnx

  • @manikantasanthoshkanchi4656
    @manikantasanthoshkanchi4656 8 місяців тому +2

    Can you send the circuit diagram

  • @FullsomeVlog
    @FullsomeVlog 6 місяців тому +1

    where's the circuit diagram 😢😢

  • @EasminAkter-te9of
    @EasminAkter-te9of День тому

    plsssss circuit diagram

  • @Dagimmaiko_Tech
    @Dagimmaiko_Tech Місяць тому +1

    where is the code

  • @MathsWalaMW-c7f
    @MathsWalaMW-c7f Місяць тому +2

    Bro isme us channel ka kya kam he

  • @kraghavikraghavi9181
    @kraghavikraghavi9181 8 днів тому

    Iam unable to copy the code can you please help

  • @legendgamingff1267
    @legendgamingff1267 Місяць тому +3

    Bro plzz send me circui diagram

  • @akshityadav9574
    @akshityadav9574 8 місяців тому +2

    Plz circuit diagram

  • @alimazeh9807
    @alimazeh9807 8 місяців тому +2

    send circuit please

  • @prasanthg4864
    @prasanthg4864 6 місяців тому +1

    I want a circuit diagram and code bro

  • @jishnudutta6028
    @jishnudutta6028 5 місяців тому +1

    Hi

  • @oscarmaiembe9948
    @oscarmaiembe9948 5 місяців тому +1

    I need the diagram

  • @boyakarthik9419
    @boyakarthik9419 13 днів тому +1

    Please send coad baii

  • @SenithaRashmindaThissera
    @SenithaRashmindaThissera 7 місяців тому +2

    what the heck were is the code

  • @sirajuddin7389
    @sirajuddin7389 6 місяців тому +1

    Bhai diagram de do please

  • @ketan1526
    @ketan1526 6 місяців тому +1

    Bhai circuit diagram

  • @oscarmaiembe9948
    @oscarmaiembe9948 5 місяців тому +1

    Or explanation

  • @HarshitpnPn-dq6jh
    @HarshitpnPn-dq6jh 9 місяців тому +1

    Plz send code

    • @RRXShorts
      @RRXShorts  9 місяців тому +1

      Check description

    • @RRXShorts
      @RRXShorts  9 місяців тому +1

      Or

    • @RRXShorts
      @RRXShorts  9 місяців тому +3

      #include
      Servo myservo; // create servo object to control a servo
      // twelve servo objects can be created on most boards
      int pos = 0;
      void setup() {
      // put your setup code here, to run once:
      myservo.attach(11);
      pinMode(2, OUTPUT);
      pinMode(3, OUTPUT);
      pinMode(4, OUTPUT);
      pinMode(5, OUTPUT);
      pinMode(6, OUTPUT);
      pinMode(A0, INPUT);
      pinMode(A1, INPUT);
      pinMode(A2, INPUT);
      Serial.begin(9600);
      digitalWrite(6, HIGH);
      }
      void loop() {
      // put your main code here, to run repeatedly:
      int a = analogRead(A0);
      int b = analogRead(A1);
      int c = analogRead(A2);
      Serial.print(a);
      Serial.print(" ");
      Serial.print(b);
      Serial.print(" ");
      Serial.print(c);
      Serial.println(" ");
      delay(50);
      if (a>=990)
      {
      digitalWrite(2, LOW);
      digitalWrite(3, LOW);
      digitalWrite(4, LOW);
      digitalWrite(5, LOW);
      digitalWrite(6, LOW);
      for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
      myservo.write(pos); // tell servo to go to position in variable 'pos'
      delay(15); // waits 15 ms for the servo to reach the position
      }
      for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
      myservo.write(pos); // tell servo to go to position in variable 'pos'
      delay(15); // waits 15 ms for the servo to reach the position
      }
      for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
      myservo.write(pos); // tell servo to go to position in variable 'pos'
      delay(15); // waits 15 ms for the servo to reach the position
      }
      //delay(200);
      }
      else if(b>=800)
      {
      digitalWrite(2, LOW);
      digitalWrite(3, LOW);
      digitalWrite(4, LOW);
      digitalWrite(5, LOW);
      digitalWrite(6, LOW);
      for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
      myservo.write(pos); // tell servo to go to position in variable 'pos'
      delay(15); // waits 15 ms for the servo to reach the position
      }
      for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
      myservo.write(pos); // tell servo to go to position in variable 'pos'
      delay(15); // waits 15 ms for the servo to reach the position
      }
      for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
      myservo.write(pos); // tell servo to go to position in variable 'pos'
      delay(15); // waits 15 ms for the servo to reach the position
      }
      }
      else if(c>=990)
      {
      digitalWrite(2, LOW);
      digitalWrite(3, LOW);
      digitalWrite(4, LOW);
      digitalWrite(5, LOW);
      digitalWrite(6, LOW);
      for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
      myservo.write(pos); // tell servo to go to position in variable 'pos'
      delay(15); // waits 15 ms for the servo to reach the position
      }
      for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
      myservo.write(pos); // tell servo to go to position in variable 'pos'
      delay(15); // waits 15 ms for the servo to reach the position
      }
      for (pos = 60; pos = 60; pos -= 1) { // goes from 180 degrees to 0 degrees
      myservo.write(pos); // tell servo to go to position in variable 'pos'
      delay(15); // waits 15 ms for the servo to reach the position
      }
      }
      else if(a200)
      {
      digitalWrite(2, LOW);
      digitalWrite(3,HIGH);
      digitalWrite(4, HIGH);
      digitalWrite(5, LOW);
      delay(100);
      digitalWrite(2, LOW);
      digitalWrite(3, LOW);
      digitalWrite(4, LOW);
      digitalWrite(5, LOW);
      digitalWrite(6, LOW);
      delay(100);
      digitalWrite(6, HIGH);
      delay(100);
      }
      else if(b400)
      {
      digitalWrite(2, LOW);
      digitalWrite(3,HIGH);
      digitalWrite(4, HIGH);
      digitalWrite(5, LOW);
      delay(100);
      digitalWrite(2, LOW);
      digitalWrite(3, LOW);
      digitalWrite(4, LOW);
      digitalWrite(5, LOW);
      digitalWrite(6, LOW);
      delay(100);
      digitalWrite(6, HIGH);
      delay(100);
      }
      else if(c400)
      {
      digitalWrite(2, LOW);
      digitalWrite(3,HIGH);
      digitalWrite(4, HIGH);
      digitalWrite(5, LOW);
      delay(100);
      digitalWrite(2, LOW);
      digitalWrite(3, LOW);
      digitalWrite(4, LOW);
      digitalWrite(5, LOW);
      digitalWrite(6, LOW);
      delay(100);
      digitalWrite(6, HIGH);
      delay(100);
      }
      else
      {
      digitalWrite(6, LOW);
      digitalWrite(2, LOW);
      digitalWrite(3, LOW);
      digitalWrite(4, LOW);
      digitalWrite(5, LOW);

      }

      }

    • @Hamidbikverdy
      @Hamidbikverdy 15 днів тому

      ​@@RRXShorts
      م

  • @ابنالعراق-ث2ش5خ
    @ابنالعراق-ث2ش5خ 3 місяці тому +1

    🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏

  • @sakthivennila3859
    @sakthivennila3859 9 місяців тому +1

    Bro please send the Circuit diagram

  • @belangovan2623
    @belangovan2623 4 місяці тому +2

    😂

  • @oscarmaiembe9948
    @oscarmaiembe9948 5 місяців тому +1

    Bro plssss

  • @steprock473
    @steprock473 8 місяців тому +2

    Please bro give me a cirucut diagram

  • @SalimaAll
    @SalimaAll 4 місяці тому +1

    Please digram circuit

  • @naveenkumar-xl5ou
    @naveenkumar-xl5ou 8 місяців тому +2

    Bro circuit diagram

  • @HarshitpnPn-dq6jh
    @HarshitpnPn-dq6jh 9 місяців тому +1

    Plz send code

  • @sainischalvancha5739
    @sainischalvancha5739 8 місяців тому +2

    please send circuit diagram