MQ Gas Sensors – Getting started
This page provides the essential information for getting started, including board and library installation and connecting the breakout board to your microcontroller.
Acknowledgement
ℹ️
The MQ Gas Sensor Arduino library is based on the MQSensorsLib library by Miguel Angel Califa Urquiza. As such, its source code is licensed under the MIT License. For more details, see the MIT License.

Arduino library
To install the Arduino library, download it from the GitHub repository:
MQX Gas Sensor Arduino library
MQ Gas Sensor Arduino library by Soldered
ℹ️
First time Arduino user? For a detailed tutorial on how to get started with Arduino, refer to this section of our docs:
Getting started with Arduino
A full, comprehensive tutorial on how to fully set up and upload code for the first time on an Arduino board, from scratch!
Connections
Below is an example connection diagram for Dasduino CONNECTPLUS. These pins will be used in the examples throughout this documentation.
Qwiic
| Dasduino CONNECTPLUS | Breakout Board |
|---|---|
| Qwiic | Qwiic |
⚠️
UPDI stands for Unified Program and Debug Interface. It is used to program and debug Atmel devices. The Atmel chip on this board is used exclusively for easyC I2C communication. DO NOT try to use this for sensor communication!
Native
| Dasduino CONNECTPLUS | Breakout Board |
|---|---|
| VCC | 5V |
| IO4 | DO |
| IO13 | AO |
| GND | GND |