MQ-7 Gas Sensor: Difference between revisions

From James's Wiki
(Created page with "http://wiki.keyestudio.com/index.php/Ks0045_keyestudio_MQ-7_Carbon_Monoxide_Gas_Sensor")
 
No edit summary
 
Line 1: Line 1:
http://wiki.keyestudio.com/index.php/Ks0045_keyestudio_MQ-7_Carbon_Monoxide_Gas_Sensor
http://wiki.keyestudio.com/index.php/Ks0045_keyestudio_MQ-7_Carbon_Monoxide_Gas_Sensor
<nowiki>/*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);
}</nowiki>

Latest revision as of 19:21, 7 October 2018

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);
}