   } else {
     moveBackward();
   }
+
+  if (digitalRead(6)) {
+    moveForward();
+
+    if (frontUltrasonic.getDistance() > 3) {
+      moveForward();
+    } else {
+      stopRobot();
+      delay(500);
+      
+      extinguisher.write(180);
+      delay(500);
+      
+      if (!digitalRead(6)) {
+        extinguisher.write(90);
+      }
+    }
+  }
   
   delay(100);
 }


Servo leftServo;
Servo rightServo;

Ultrasonic frontUltrasonic(FRONT_US_ECHO, FRONT_US_TRIG, true);


  leftServo.attach(LEFT_SERVO_PIN);
  rightServo.attach(RIGHT_SERVO_PIN);

  pinMode(6, INPUT);
}

void loop() {
