Getting Started
Materials Required
Component | Image |
---|---|
MQ3 Alcohol Sensor Module | |
0.96′ I2C OLED display | |
Arduino Mega or Uno | |
Small Breadboard | |
Jumper Wires |
Hardware Setup
Component | Wire | To Arduino Pin |
---|---|---|
OLED | VCC | 5V |
GND | GND | |
SCL | A5 | |
SDA | A4 | |
------------- | ------ | ---------------- |
Gas Sensor | VCC | 5V |
GND | GND | |
AD | A0 |
Software Setup
Downloading Arduino IDE:
- Visit the Arduino website and download the latest version of the Arduino IDE for your operating system.
- Follow the installation instructions provided on the website.
Connecting the Arduino Board:
- Connect the Arduino board to your computer using a USB cable.
- 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:
- Open the Arduino IDE.
- Go to Sketch > Include Library > Manage Libraries.
- 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:
- Select your Arduino board model under Tools > Board.
- Select the correct port under Tools > Port where your Arduino is connected.