0% found this document useful (0 votes)
7 views2 pages

Experiment - 6

This document provides instructions for an experiment to interface an OLED display with an Arduino board to display temperature and humidity readings from a DHT sensor. It involves setting up the hardware by connecting the OLED display and DHT sensor to the Arduino board, installing the necessary libraries, uploading code to the Arduino, and running the program to display the sensor readings on the OLED screen.

Uploaded by

Sneham Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Experiment - 6

This document provides instructions for an experiment to interface an OLED display with an Arduino board to display temperature and humidity readings from a DHT sensor. It involves setting up the hardware by connecting the OLED display and DHT sensor to the Arduino board, installing the necessary libraries, uploading code to the Arduino, and running the program to display the sensor readings on the OLED screen.

Uploaded by

Sneham Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Experiment : 6

Aim : - To interface an OLED display with an Arduino and write a program to print
temperature and humidity readings on it.

Materials needed:
1. Arduino board (e.g., Arduino Uno)
2. OLED display (e.g., SSD1306)
3. DHT11 or DHT22 temperature and humidity sensor
4. Jumper wires
5. Breadboard

Step 1: Hardware setup


1. Connect the VCC pin of the OLED display to the 5V pin on the Arduino.
2. Connect the GND pin of the OLED display to the GND pin on the Arduino.
3. Connect the SCL pin of the OLED display to the A5 pin on the Arduino.
4. Connect the SDA pin of the OLED display to the A4 pin on the Arduino.
5. Connect the VCC pin of the DHT sensor to the 5V pin on the Arduino.
6. Connect the GND pin of the DHT sensor to the GND pin on the Arduino.
7. Connect the data pin (either DHT11 pin 2 or DHT22 pin 1) of the DHT sensor to a digital
pin on the Arduino (e.g., pin 7).

Step 2: Install libraries


1. Open the Arduino IDE on your computer.
2. Go to "Sketch" -> "Include Library" -> "Manage Libraries".
3. Search for "Adafruit SSD1306" and click the "Install" button to install the library for the
OLED display.
4. Search for "DHT" and install the library for the DHT sensor.

Step 3: Upload the code


Copy and paste the following code into the Arduino IDE:
Step 4: Upload and Run
1. Connect your Arduino to your computer using a USB cable.
2. Select the appropriate board and port in the Arduino IDE.
3. Click the "Upload" button to upload the code to the Arduino.
4. Once uploaded, you should see the temperature and humidity readings displayed on the
OLED display.

That's it! You have successfully interfaced an OLED display with an Arduino and created a
program to print temperature and humidity readings on it.

You might also like