mq4 Sensor
mq4 Sensor
h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27,16,2);
void setup() {
Serial.begin(115200);
lcd.init();
lcd.backlight();
void loop() {
lcd.setCursor(0, 0);
// Read the analog output measurement sample from the MQ4 sensor's AO pin
lcd.print ("CH4 input: "); // Print out the text "Methane Concentration: "
lcd.print (FirstSensorAO_Out); // u out the methane value - the analog output -
beteewn 0 and 1023
lcd.setCursor(0,1);
// Read the analog output measurement sample from the MQ4 sensor's AO pin
lcd.print ("CH4 output: "); // Print out the text "Methane Concentration: "
lcd.print (SecondSensorAO_Out); // u out the methane value - the analog output -
beteewn 0 and 1023
delay(1000);
}