Arduino Fire Fighting Robot| RRX Tech |

Поделиться
HTML-код
  • Опубликовано: 31 янв 2024
  • How to make a fire fighting robot using arduino | RRX Tech |
    Here is the code link-
  • Авто/МотоАвто/Мото

Комментарии • 40

  • @RRXShorts
    @RRXShorts  5 месяцев назад +20

    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 5 месяцев назад +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

  • @ananyadudhalkar7392
    @ananyadudhalkar7392 4 месяца назад +2

    Circuit diagram plus all the components used please name them

  • @SalimaAll
    @SalimaAll 15 дней назад +1

    Please digram circuit

  • @Singhdasnoor
    @Singhdasnoor 4 месяца назад +2

    I want circuit diagram plz send me

  • @manikantasanthoshkanchi4656
    @manikantasanthoshkanchi4656 4 месяца назад +2

    Can you send the circuit diagram

  • @jadenpadilla4467
    @jadenpadilla4467 3 месяца назад +2

    bro you have diagram? please send a link tnx

  • @RRXShorts
    @RRXShorts  5 месяцев назад +1

    If any issue comes you can ask me

  • @sainischalvancha5739
    @sainischalvancha5739 4 месяца назад +2

    please send circuit diagram

  • @akshityadav9574
    @akshityadav9574 4 месяца назад +2

    Plz circuit diagram

  • @steprock473
    @steprock473 5 месяцев назад +2

    Please bro give me a cirucut diagram

  • @prasanthg4864
    @prasanthg4864 2 месяца назад +1

    I want a circuit diagram and code bro

  • @harish012.
    @harish012. 2 месяца назад +3

    Your code totally wrong bro please send correct code please

  • @jishnudutta6028
    @jishnudutta6028 Месяц назад +1

    Hi

  • @user-dz5fy1ix3z
    @user-dz5fy1ix3z 3 месяца назад +1

    plz send circuit diagram

  • @FullsomeVlog
    @FullsomeVlog 2 месяца назад +1

    where's the circuit diagram 😢😢

  • @alimazeh9807
    @alimazeh9807 4 месяца назад +2

    send circuit please

  • @Thinbrushtechnical9730
    @Thinbrushtechnical9730 5 месяцев назад +2

    From which line code start ans pls send diagram

  • @sirajuddin7389
    @sirajuddin7389 3 месяца назад +1

    Bhai diagram de do please

  • @oscarmaiembe9948
    @oscarmaiembe9948 2 месяца назад +1

    I need the diagram

  • @ketan1526
    @ketan1526 3 месяца назад +1

    Bhai circuit diagram

  • @oscarmaiembe9948
    @oscarmaiembe9948 2 месяца назад +1

    Or explanation

  • @belangovan2623
    @belangovan2623 10 дней назад +1

    😂

  • @naveenkumar-xl5ou
    @naveenkumar-xl5ou 4 месяца назад +2

    Bro circuit diagram

  • @HarshitpnPn-dq6jh
    @HarshitpnPn-dq6jh 5 месяцев назад +1

    Plz send code

  • @oscarmaiembe9948
    @oscarmaiembe9948 2 месяца назад +1

    Bro plssss

  • @SenithaRashmindaThissera
    @SenithaRashmindaThissera 3 месяца назад +2

    what the heck were is the code

  • @sakthivennila3859
    @sakthivennila3859 5 месяцев назад +1

    Bro please send the Circuit diagram

  • @HarshitpnPn-dq6jh
    @HarshitpnPn-dq6jh 5 месяцев назад +1

    Plz send code

    • @RRXShorts
      @RRXShorts  5 месяцев назад +1

      Check description

    • @RRXShorts
      @RRXShorts  5 месяцев назад +1

      Or

    • @RRXShorts
      @RRXShorts  5 месяцев назад +2

      #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);

      }

      }