Skills

Projects

Machine Learning Projects

Front-end Development

Developed 11+ projects using CSS properties like Flexbox, Grid, and JavaScript manipulations.

Python & C++ Projects

Developed numerous projects during my master's degree lab sessions.

Fire Detection System

Step 1: Gather Components

Step 2: Assemble the Circuit

Component Arduino Pin
Flame Sensor A0 (Analog)
Smoke Sensor A1 (Analog)
Buzzer Pin 8 (Digital)
LED Pin 9 (Digital)
GND GND
VCC 5V

Step 3: Arduino Code (C++)

            
                void setup(){
                    pinMode(A0, INPUT);
                    pinMode(A1, INPUT);
                    pinMode(8, OUTPUT);
                    pinMode(9, OUTPUT);
                    Serial.begin(9600);
                }

                void loop(){
                    int flameValue = analogRead(A0);
                    int smokeValue = analogRead(A1);

                    Serial.print("Flame: ");
                    Serial.print(flameValue);
                    Serial.print(" | Smoke: ");
                    Serial.println(smokeValue);

                    if (flameValue < 200 || smokeValue > 300){
                        digitalWrite(8, HIGH);
                        digitalWrite(9, HIGH);
                        Serial.println("🔥 Fire Detected! 🔥");
                    } else {
                        digitalWrite(8, LOW);
                        digitalWrite(9, LOW);
                    }
                    delay(500);
                }
            
        

Step 4: Run the Python Code for Monitoring

            
                pip install pyserial
            
        
            
                import serial
                import time
                
                arduino = serial.Serial('COM3', 9600, timeout=1)
                time.sleep(2)
                
                while True:
                    try:
                        data = arduino.readline().decode().strip()
                        if data:
                            print("Received:", data)
                            if "Fire Detected" in data:
                                print("🔥 WARNING: Fire Detected! 🔥")
                    except KeyboardInterrupt:
                        print("Exiting...")
                        arduino.close()
                        break
            
        

Step 5: Testing the System

Flame Sensor Testing

Use a lighter or candle (at a safe distance). If detected, the buzzer and LED should turn on.

Smoke Sensor Testing

Blow smoke near the MQ-2/MQ-135 sensor. If detected, the buzzer and LED should turn on.