Gas Leak Detector II

I added some function to the switch I made last week.

The code looks like this.

When the sensor is not detecting gas, the blue LED blinks every one second. When the sensor detects gas leak (when the value of the analog in is greater than 250), red and yellow LEDs flash to let you know there is a gas leak.

My apartment doesn’t have a good ventilation. I tested the machine with alcohol instead of gas to be safe since the sensor detects alcohol too.

Here is the test video.

Leave a Reply