Skip to main content

Getting Started

Materials Required

ComponentImage
MQ3 Alcohol Sensor Module
0.96′ I2C OLED display
Arduino Mega or Uno
Small Breadboard
Jumper Wires

Hardware Setup

ComponentWireTo Arduino Pin
OLEDVCC5V
GNDGND
SCLA5
SDAA4
-----------------------------------
Gas SensorVCC5V
GNDGND
ADA0

Software Setup

Downloading Arduino IDE:

  1. Visit the Arduino website and download the latest version of the Arduino IDE for your operating system.
  2. Follow the installation instructions provided on the website.

Connecting the Arduino Board:

  1. Connect the Arduino board to your computer using a USB cable.
  2. Ensure the connection is secure. Sometimes a loose connection can cause the board to be not recognized. A tight connection resolved this issue for me (thanks to a helpful YouTube comment).

Installing Required Libraries:

  1. Open the Arduino IDE.
  2. Go to Sketch > Include Library > Manage Libraries.
  3. In the Library Manager, search for and install the following libraries:
    • Adafruit GFX Library: This core graphics library provides a common set of graphics primitives (points, lines, circles, etc.) and needs to be paired with a hardware-specific library.
    • Adafruit SSD1306 OLED Display Library: This library is specifically for OLED displays based on SSD1306 drivers.

Setting Up the Arduino IDE:

  1. Select your Arduino board model under Tools > Board.
  2. Select the correct port under Tools > Port where your Arduino is connected.