MQ-7 Gas Sensor

From James's Wiki
Revision as of 19:21, 7 October 2018 by Ractive (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

http://wiki.keyestudio.com/index.php/Ks0045_keyestudio_MQ-7_Carbon_Monoxide_Gas_Sensor

/*Arduino Sample Code
 * hookup up to analog 0
 */
void setup()
{
  Serial.begin(9600); //Set serial baud rate to 9600 bps
}
void loop()
{
int val;

val=analogRead(0);//Read Gas value from analog 0
Serial.println(val,DEC);//Print the value to serial port
delay(100);
}C);//Print the value to serial port
delay(100);
}