Hello, I'm currently using this wiring to connect the MQ-7 and LCD together, but I can't get the code working
Link to wiring
Currently this is the Code, and I'm using it from the tutorial
int mqx_analogPin = A0; // connected to the output pin of MQ-X
void setup(){
Serial.begin(9600); // open serial at 9600 bps
}
void loop()
{
// give ample warmup time for readings to stabilize
int mqx_value = analogRead(mqx_analogPin);
Serial.println(mqx_value);
delay(100); //Just here to slow down the output.
}
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
{
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("CO ppm");
}
void loop()
{
// give ample warmup time for readings to stabilize
int mqx_value = analogRead(mqx_analogPin);
lcd.setCursor(0, 1);
lcd.print(mqx_value);
delay(100); //Just here to slow down the output.
}
I keep getting errors, and can guys you help me get the code working please
Link to Tutorial, and the code is from the tutorial