Çalışma Voltajı | 5V DC |
Ölçüm Hassasiyeti | 300 - 10.000ppm |
Data Çıkışı | Analog - Dijital |
En | 43.45mm |
Boy | 57.5mm |
Vida Delik Çapı | 3.2mm |
MQ-2 Gaz Sensörü | Arduino Uno Breadboard |
DATA | A0 |
- | GND |
+ | 5V |
Örnek Proje Arduino Kodu
/* ALPGEN Robotics // MQ2 Gaz Sensör Modülü Kullanımı // 15.05.2021 // Soru ve Yardım İçin: [email protected] // www.alpgenrobotics.com */ #define MQ2pin (0) float sensorValue; //variable to store sensor value void setup() { Serial.begin(9600); // sets the serial port to 9600 Serial.println("Gas sensor warming up!"); delay(20000); // allow the MQ-6 to warm up } void loop() { sensorValue = analogRead(MQ2pin); // read analog input pin 0 Serial.print("Sensor Value: "); Serial.print(sensorValue); if(sensorValue > 300) { Serial.print(" | Smoke detected!"); } Serial.println(""); delay(2000); // wait 2s for next reading }