The below code is used to get the Rzero value of a particular MQ135 sensor, this is the resistance of the sensor in the presence of clean air.
#include "MQ135.h" const int ANALOGPIN=A0; MQ135 gasSensor = MQ135(ANALOGPIN); void setup(){ Serial.begin(9600); // sets the serial port to 9600 } void loop(){ float rzero = gasSensor.getRZero(); Serial.println(rzero); delay(1000); }