user13612: I bought an FC-22 (MQ135) gas sensor module which I plugged into my Arduino Uno. I connected it to the A0 analog port. Then created a code that reads the raw data from A0 (code below).
When I run the code on my Arduino Uno in my house I get values of about 30. If I blow over the sensor I get values until about 160. My question is now how I have to read / interpret these values.
According to the MQ135 specifications the sensor has a sesitivity for air quality, measuring benzene, alcohol and smoke.
How can I interpret the values I get? What is a good value and what isn't? Do I have to calculate something out of these values?
My code looks like this:
void setup() {
  Serial.begin(9600);
  pinMode(13, OUTPUT);
}

void loop() {
  int sensorValue = analogRead(0);
  Serial.print(sensorValue, DEC);
  delay(100);
  if (sensorValue > 50) {
    digitalWrite(13, HIGH);
  }
  else {
    digitalWrite(13, LOW);
  }
}


user2881: According to the datasheet you have to calibrate it.

13612: <p>I bought an FC-22 (MQ135) gas sensor module which I plugged into my Arduino Uno. I connected it to the A0 analog port. Then created a code that reads the raw data from A0 (code below).</p>

<p>When I run the code on my Arduino Uno in my house I get values of about 30. If I blow over the sensor I get values until about 160. My question is now how I have to read / interpret these values.</p>

<p>According to the MQ135 specifications the sensor has a sesitivity for air quality, measuring benzene, alcohol and smoke.</p>

<p>How can I interpret the values I get? What is a good value and what isn't? Do I have to calculate something out of these values?</p>

<p>My code looks like this:</p>

<pre><code>void setup() {
  Serial.begin(9600);
  pinMode(13, OUTPUT);
}

void loop() {
  int sensorValue = analogRead(0);
  Serial.print(sensorValue, DEC);
  delay(100);
  if (sensorValue &gt; 50) {
    digitalWrite(13, HIGH);
  }
  else {
    digitalWrite(13, LOW);
  }
}
</code></pre>
 2881: <p>According to the <a href="https://www.olimex.com/Products/Components/Sensors/SNS-MQ135/resources/SNS-MQ135.pdf" rel="nofollow">datasheet</a> you have to calibrate it.</p>
