MQ7 SENSOR

CODE:

#include<maker_mq7.h>

uint8_t AN_PIN=A0;


int main()
{


init();
Serial.begin(9600);
maker_returnR0( A0);

while(1)
{

Serial.print(“Sensor_volt=”);
Serial.println(maker_returnSensorVolt(AN0));
Serial.print(“RS=”);
Serial.println(maker_returnRS(A0));
Serial.print(“RS/R0”);
Serial.println(maker_returnPercentage(A0));
delay(1000);

}
return 0;

}

MQ7 sensor can be used for gas leakage detection and it is mostly used for detecting carbon monoxide. It is highly sensitive and very responsive and this allow us to do some quick measurements.

VCC – power supply pin (5V)

GND – ground pin (0V)

AO – output analog pin

DO – output digital pin 

Coded by: