MQ3 SENSOR

CODE:

#include<maker_mq3.h>

uint8_t AN_PIN=A2;


int main()
{


init();
Serial.begin(9600);
maker_getEnvirionmentR0( AN_PIN);

while(1)
{

Serial.print(“Sensor_volt=”);
Serial.println(maker_getSensorVolt(AN_PIN));
Serial.print(“RS=”);
Serial.println(maker_getRSAir(AN_PIN));
Serial.print(“RS/R0”);
Serial.println(maker_getRatio(AN_PIN));
delay(1000);

}
return 0;

}

MQ3 sensor can be used for gas leakage detection and it is mostly used for detecting alcohol, but it can be also used to detect some other chemical compounds, such as benzine and methane. 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: