https://www.amazon.com/gp/product/B081C ... =UTF8&th=1
and an MQ-7 sensor: https://www.robotshop.com/en/mq-7-gas-sensor.html
I am trying to read data from the analog and digital ports and display the information on the serial monitor on the Arduino IDE. However, I keep seeing the error messaged that I attached.
This is my code:
const int AOUTpin=0;
const int DOUTpin=8;
int limit;
int value;
void setup() {
Serial.begin(115200);
pinMode(DOUTpin, INPUT);
}
void loop()
{
value= analogRead(AOUTpin);
limit= digitalRead(DOUTpin);
Serial.print("CO value: ");
Serial.println(value);
delay(100);
}
For my connections,
ESP8266 VIN to MQ-7VCC
ESP GND to MQ-7 GND
ESP D0 to MQ-7 DOUT
ESP A0 to MQ-7 AOUT
How do I fix this?