Step 1: Get the Materials!
-An arduino (preferably an arduino uno )
-An arduino mq-4 gas sensor- $7 (http://amzn.to/1Q1sfdE)
-jumper wires for arduino
-mini arduino breadboards [found on Amazon] (you can also use a standard one)
-two different color LEDs
-1 9v battery
-1 arduino 9v battery connector (Amazon)
-a battery back for two AA batteries
Step 2: Set Up the Detector
GND to GND on the arduino (BLUE)
VCC to 5v on arduino (RED)
OUT to pin 8 on arduino (ORANGE)
Step 3: Set Up the LEDs
The positive leg which is the longer one will go to the 12th pin and the other leg( the negative leg, the shorter one.) this will go to GND.
The "unsafe" led (the one that will safe that the amount of methane maybe unsafe) the positive leg (the longer one) will go to 12 and the other one with go to GND.
Step 4: The Code!
The some of the code was used from the Ardusniffer projects. I was revised by me.