
MQ7 Carbon Monoxide Sensor
sensors

The MQ135 Gas Sensor Module is widely used for detecting various harmful gases in the air, making it ideal for air quality monitoring systems. It is sensitive to gases like ammonia (NH₃), sulfur dioxide (SO₂), benzene, alcohol, smoke, carbon dioxide (CO₂), and more.
The MQ135 sensor contains a SnO₂ (tin dioxide) sensing layer that has a low conductivity in clean air. When exposed to certain gases, the conductivity increases, and this change is used to measure gas concentration.
const int analogPin = A0; // Analog output pin
const int digitalPin = 2; // Digital output pin
int analogValue = 0;
void setup() {
Serial.begin(9600);
pinMode(digitalPin, INPUT);
}
void loop() {
// Read analog value
analogValue = analogRead(analogPin);
// Print analog value (gas concentration)
Serial.print("Analog Value: ");
Serial.println(analogValue);
// Check digital output
if (digitalRead(digitalPin) == HIGH) {
Serial.println("Gas concentration exceeded threshold!");
}
delay(1000);
}
Shop more
Products from the same category or commonly paired with this item.
Shop more
Customer favorites that are getting the most attention.
Shop more
Freshly added items from the shop.