So finden Sie die Co2-und O2-Ebene mit MQ135 mit Arduino

Wie findet die Co2-und O2-Pegel oder andere Parameter mit Hilfe MQ135 mit Arduino, ich spürte ppm-Daten und zeigt Sie auf dem Bildschirm.

int sensorValue;
int pin8 = 8;
void setup()
{
  Serial.begin(9600);      //sets the serial port to 9600
  pinMode(pin8, OUTPUT);
}

void loop()
{
  sensorValue = analogRead(0);       //read analog input pin 0
  Serial.print(sensorValue, DEC);  //prints the value read
  Serial.println("ppm");
  if (sensorValue > 500) {
    //Activate digital output pin 8 - the LED will light up
    digitalWrite(pin8, HIGH);
  }
  else {
    //Deactivate digital output pin 8 - the LED will not light up
    digitalWrite(pin8, LOW);
  }

  delay(5000);                        //wait 100ms for next reading
}

InformationsquelleAutor Jitendra Reddy | 2015-06-29

Schreibe einen Kommentar