ozge_1
Published © LGPL

Lcd buzzer ve led ile gaz sensörü

Evinizde korkmadan yaşayın

IntermediateWork in progress98
Lcd buzzer ve led ile gaz sensörü

Things used in this project

Hardware components

Grove - Gas Sensor(MQ2)
Seeed Grove - Gas Sensor(MQ2)
×1
Resistor 10k ohm
Resistor 10k ohm
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
×1
5 mm LED: Green
5 mm LED: Green
×1
Buzzer
Buzzer
×1
Alphanumeric LCD, 16 x 2
Alphanumeric LCD, 16 x 2
×1
Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
Male/Male Jumper Wires
×15
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

made with tincercad

Code

gaz uygulaması

BatchFile
#define sensor A0
#define led 3
#define buzzer 10
#include <LiquidCrystal.h>
LiquidCrystal(9,8,7,6,5,4);
void setup() {
  // put your setup code here, to run once:
pinMode(led,OUTPUT);
pinMode(buzzer,OUTPUT);
lcd.begin(16,2);
pinMode(sensor,INPUT);
Serial.begin(9600);
lcd.print("dikkat");
}

void loop() {
  // put your main code here, to run repeatedly:
int sensordeger=analogRead(sensor);
Serial.print("sensrdeeri:");
Serial.println(sensordeger);
if (sensordeger>=350){
  digitalWrite(led,HIGH);
delay(1000);
  digitalWrite(led,LOW);
  delay(1000);
  if(sensordeger>=600){
 digitalWrite(buzzer,HIGH);
 delay(1000);
 digitalWrite(buzzer,LOW);
 delay(1000);
 
  
}
  }
else{
  digitalWrite(led,LOW);
    digitalWrite(buzzer,LOW);

  
}
}

Credits

ozge_1

ozge_1

1 project • 0 followers

Comments

Add projectSign up / Login