Created
November 17, 2018 07:48
-
-
Save hkstemclub/3fec428bd6d4cf30b47ec59525408fbd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Testing MQ GAS sensor with serial monitor | |
Suitable for detecting of LPG, i-butane, propane, methane ,alcohol, Hydrogen or smoke | |
More info: http://www.ardumotive.com/how-to-use-mq2-gas-sensor-en.html | |
Dev: Michalis Vasilakis // Date: 11/6/2015 // www.ardumotive.com */ | |
const int gasPin = A0; //GAS sensor output pin to Arduino analog A0 pin | |
void setup() | |
{ | |
Serial.begin(9600); //Initialize serial port - 9600 bps | |
} | |
void loop() | |
{ | |
Serial.println(analogRead(gasPin)); | |
delay(1000); // Print value every 1 sec. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment