Answer the question
In order to leave comments, you need to log in
Why does the temperature change its value if we connect the MQ-4 sensor?
Arduino sketch:
int sensorPin = 0;
int Gas = 1;
void setup()
{
Serial.begin(115200);
}
void loop()
{
int reading = analogRead(sensorPin);
float voltage = reading * 5.0;
voltage /= 1024.0;
// now print out the temperature
int temperatureC = (voltage - 0.5) * 100 ;
Serial.println(temperatureC);
Serial.println(analogRead(Gas));
delay(1000); //waiting a second
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question