This is our MQ breakout board for the micro:bit, connecting to an analog input, it gives you a reading based on the concentration of the detectable gas.
The gas:bit will not give you a PPM reading due to the resolution of the analog input, but can be great for detecting if the gas is in the air! We have used it with an alcohol sensor to make our own breath alcohol detector, giving an output when the concentration of alcohol on the breath was over a given value!
Please note : This board does NOT come with a sensor or micro:bit.
MQ8 - Hydrogen
MQ6 - LPG (Butane or Propane)
MQ4 - Methane or Compressed Natural Gas
MQ3 - Alcohol or Benzine
MQ2 - Flammable Gas and Smoke High Sensitivity for LPG, Propane and Hydrogen
Sample uPython code :
from microbit import *
# 'Flame' animation graphics
firea = Image("00900:"
fireb = Image("00900:"
# Wait for 60 Seconds - allow sensor to heat up
for x in range(0,60):
threshold = 800
reading = pin2.read_analog()
if (reading > threshold):