Lego Sherlock Holmes figure focuses a light beam on a Lego criminal with a small magnifying glass.

Flammable Gas Sensor

Sensors that create a analog output can be turned into EV3 sensors by using the EV3 Intelligent Brick to read the sensor’s signal. The blog post on Reading Analog Voltage explains how to do this. I used this idea to connect an MQ2 Analog Gas Sensor (made by DF Robot and purchased from to an EV3 Intelligent Brick. The video above gives a tour of the device. The EV3 Intelligent Brick displays a number indicating relative concentration of a flammable gas, as well as giving an audible tone. The EV3 program for the function used in the video is shown below.

The program is shown for the gas sensor configuration used for the video.