How to make fire fighting robot with arduino | Code
Channel: techub
Date: 14/12/2019

How to make fire fighting robot with arduino | Code

DEFINE LEFT SENSOR Analog Pin 0
DEFINE LEFT SENSOR Analog Pin 1
DEFINE LEFT SENSOR Analog Pin 2

NOTE: I USED ANALOG INPUTS FOR IR FIRE DETECTING, AS IN MY TEST THIS WAS MUCH BETTER THEN USING DIGITAL PINS.

DEFINE LEFT FORWARD MOTOR PIN WITH PWM
DEFINE LEFT BACKWARD MOTOR PIN WITHOUT PWM
DEFINE RIGHT FORWARD MOTOR PIN WITH PWM
DEFINE RIGHT BACKWARD MOTOR PIN WITHOUT PWM

NOTE: I WAS HAVING PROBLEM WITH THIS BOARD IN PIN 9,10 TO RUN IN PWM MODE. IF YOU CAN RUN 9,10 IN PWM MODE THEN YOU CAN USE THEM. IN MY CASE I HAD ISSUES.

DEFINE PUMP MOTOR INPUT PIN
DEFINE SERVO MOTOR INPUT PIN

NOTE: I USED PIN 11 FOR PWM BECAUSE I WAS FACING SOME ISSUES IN MYSERVO FUNCTIONS

ALL 3 SENSOR VALUES ADD UP HERE Their PASSED OUT IN TO THIS VARIABLES  

THEN THEY ARE SCANNED TO FIND THE location OF THE FIRE
THEN MOVE THE ROBOT TO THE LOCATION AND CALL FIRE FUNCTION
IT AGAIN SCAN FOR FIRE. IF FIRE FOUND IT SETS FIRE TO TRUE,.AND IF FIRE NOT FOUND THE ROBOT STAYS IN SAME LOCATION. IF THE FIRE IS FOUND THE IT CALLS PUT OFF FIRE FUNCTION. PUT OFF FIRE FUNCTION STOPS THE ROBOT IN PLACE. TURNS ON THE PUMP. MOVES THE SERVO LEFT 90 DEGREE. MOVES THE SERVO RIGHT 90 DEGREE. 

CODE:
https://github.com/Tanvirtan/AutomaticFireFightingRobot

Fiverr gigs: https://www.fiverr.com/younus_ali

Here is the circuit diagram link https://github.com/Tanvirtan/AutomaticFireFightingRobot/blob/master/DIY-Arduino-based-Fire-Fighting-Robot-circuit-diagram.png

Musics:
Coming Home - LiQWYD & Dayfox [Vlog No Copyright Music]
https://youtu.be/s62mBX_0TdA

Call Me - LiQWYD [Vlog No Copyright Music]
https://youtu.be/JUgEjnESJXI